Do not attempt to commit if not in a transaction

Some code I'm writing that uses DBIx::ThinSQL wants to call
->rollback() itself inside a $db->txn(sub{}).
Handle undef/NULL combinations in hashrefs.