Tweaked location of profiling in query() to split out the implicit BEGIN

* This also should make the DBPerformance log look clearer.

Change-Id: I98764647bbb19a5f130bd3d87488f32cb2825ea8
Merge "Tweaked location of profiling in query() to split out the implicit BEGIN"