Cleanups to DB transaction handling

* Only do requeries after automatic reconnection if there is no trx open instead.
  of doing possible half-broken changes and not fully updating trx state variables
* Also made trxLevel() no longer take an argument.
* Avoid clearing trx fields in some redundant places to make the code simpler
  Only mTrxLevel needs to be well tracked in various places. For the other fields,
  code just checks mTrxLevel before using those fields.
  They do need to be cleared in begin() though.
* Moved endAtomic() up next to startAtomic().
* Improved mTrxLevel docs

Change-Id: I12adfb4fcb28a4832facd63baee2283ead500bd2
Merge "Cleanups to DB transaction handling"