Send method and header in one go

To avoid the scenario in which the message publish method is sent, but
attempting to send the header fails, I now encode the method and the
header before sending both. Encoding is the second most likely cause
of problems; the first is trying to send something other than a byte
buffer, so I also check the `content` argument.

This changes the connection API such that `sendContent` only sends
content, instead of the header *then* content, and there's an
additional method `sendMethodAndProperties`.

The original way seemed correct in that it resulted in fewer methods
(just sendMethod and send[HeaderAnd]Content); however, it's more er,
correct, to factor the methods such that the channel can't be in an
invalid state in-between method calls.

(Side note: this may also open the way for e.g., sendStream, since the
'whole' content doesn't have to be given at once any longer).
Merge remote-tracking branch 'origin/master' into AddDefsForDeployment