tm: do not call kill_transaction_unsafe() on a transaction that has no open branches

- There was a race condition between 2 processes trying to continue the
  same transaction that would sometimes cause a double free.