Make sure that all transactions created by TransactionsTestCase.testMaximumActiveTransactions() are closed.

This avoids IllegalStateException("Too many active transactions") thrown by tests executed afterwards.
Add a safeguard against unterminated transactions (works only for transactions createdy by calling AbstractTransactionTest.newTransaction)