This patch makes Transaction.commit() mirror the actions taken in
Transaction.rollback(), namely expiring cached objects and marking
the Transaction obsolete.
I was motivated to make this change because I noticed my number
of database connections growing without bound and I realized why -
after calling trans.commit(), the underlying DBConnection was not
being released back into the pool. And because the transaction
wasn't being marked obsolete, it couldn't be reused by calling
.begin(). So in effect, that DBConnection was lost.