Major clean-up of transaction handling, failed transactions are now
properly rolled back, including better Exception, proper state of rolled
back objects, schema object invalidation and closing of transaction or
session (for certain exceptions).