Make autoclose easier to understand, more consistent and more testable

- Move transaction state transition logic to TransactionStateMachine
 - Define autoclose behaviour in BlobTx to behave like TransactionStateMachine
 - Implement LocalBlobTx using TransactionStateMachine
 - Add tests for TransactionStateMachine
 - Update existing unit tests that relied on old auto-commit-on-close behaviour

---------------
The intention was to make it easy for a client of BlobTx to read what should happen in the javadoc. The rest of it is about being able to test that behaviour and to have multiple implementations share that behaviour. This should help the an implementer of BlobTx get the behaviour that is documented in the interface with a minimum of fuss.

The nice formatting of the state transition tables got lost. The text was just slightly too long with the exceptions :(