fix memleaks, add Txn::commit_or_abort()