Add a state property to sync transactions.
Use the new state property on sync transactions to clean up after they've been closed.