Add negative tests for MsgHeaders.

This commit adds tests for the error paths when encoded and decoding
MsgHeaders.