Fix: ws_transaction_new() comparsion
Fix: deserializer_state(_new())

This patch fixes the deserializer_state type as well as the
deserializer_state_new() function. We don't need to cache the allocation
type here. It also adds an initialization for the bracket counting and
the ID (zero is an invalid ID now).
Fix: ws_transaction_push_statement()

This patch fixes the ws_transaction_push_statement() function by
doing a (almost) complete rewrite.

The code was tested in another branch.