Add additional header sanity check.
Raise PluggableTransportError rather than assert.

An assert is not the right way to check for overly long protocol messages.
Especially because it can be optimised away.