Eliminating dependence on transaction context-managers for legacy-mode SQL drivers (GH8277)

Eliminating contextmanager based transaction-handling

Rewriting as contextmanager

Code review fixes