[1.7.x] Simplified handling of use_debug_cursor.

Turned it from a tri-valued boolean into a regular boolean.

Backport of 127218b9 from master.
[1.7.x] Fixed #20420 -- Normalized query counts on Oracle.

This is achieved by inserting a fake entry in connection.queries when
not releasing a savepoint (since Oracle doesn't support that operation.)

Also removed the can_release_savepoints feature that was recently added,
but is superseded by this solution.

Backport of 40bfd856 from master.