[Transaction] Replace template for functor with std::function
Summary:
The callback parameter has a specific type, it accepts a document ID and
returns bool, while the template is overly broad.
Reviewers: Baloo, ngraham, astippich, poboiko
Reviewed By: Baloo, ngraham
Subscribers: kde-frameworks-devel
Tags: Frameworks, Baloo
Differential Revision: https://phabricator.kde.org/D21703