RUBY-1327 Don't crash in SqlSampler.on_finishing_transaction with bad TransactionState