Eliminating contextmanager based transaction-handling

To close #8277
`trans.conneciton` -> `trans` ? (for sqlalchemy, this gives already a connection, and for fallback a cursor)