Simplify unsubscription

instead of returning an id from `client.subscribe()`, return
a literal with an `unsubscribe()` method that can be called directly.
simplify transaction

the `begin()` method returns a JavaScript object with `commit()` and
`rollback()` methods to complete the transaction.