Reset state when finishing the current transaction.
Consume whitespace in deserialize()

deserialize() consumes whitespace at the start of the transaction buffer
on its own.
Merge pull request #345 from matthiasbeyer/fix-json_deserializer_restart_parsing

Fix JSON deserializer for restarting parsing