Fix an TypeError on StatementWrapperIterator that occurs at the end of running phpunit
- add method hasClientConnection() to Connection.php to have a mean to know if the underlying database connection is available
- avoid running processPostTransactionCallbacks if the underlying database connection has already been destructed
Closes #3538834