Better approach to log SQL queries
Summary: It's a more clean solution, and allows to log transaction queries
Test Plan: ./phpunit
Reviewers: #hkccp_developers, mollekopf
Reviewed By: #hkccp_developers, mollekopf
Subscribers: mollekopf, #hkccp_developers
Differential Revision: https://git.kolab.org/D4576