Add simple getters for database $inTransaction

Since when extensively working with transactions, it is often important
to know whether a transaction has already been started or not.

And while all Connection classes do already have a protected $inTransaction
property, there are only the getter methods missing.