This commit adds tests for the error paths when reading the initial message header and message payload from the wire.
These functions used to be split into multiple files, but since the code was reorganized there is no longer any reason to split them.