Changed TransactionProfiler to only work via the DB classes

* This makes it work with xhprof/xdebug, though it will only examine DB queries.

Change-Id: I999b66e6c3af88dda408b2252c248e085af9eea4
Merge "Changed TransactionProfiler to only work via the DB classes"