Fixes #2255

The cause was that there was a subclass of QueuItem (TxnQueueItem) that was serialized, but when deserializing
the deserialize method of the QueueItem was called. So the stream could corrupted because not all fields were
being read.
Minor testing cleanup
Minor test cleanup
Merge pull request #2261 from pveentjer/issue-2255/incorrect-header-check

Fixes #2255