Changed TransactionStack to SavePointStack,
before/afterStartTransaction to before/afterTransaction

Also changed the methodology behind the commit event, which
should only be called when the actual 'commit' query is sent
and not when the savepoint is simply released.
Adding the `registerOne` method to Event class.
Allows an event to be bound and then removed.