Allow customization of callbacks, using more info from the backend.
Simplify by using functor signatures where applicable.
Implement Report.affected_count for sqlite.