Moved most of Message.bytes() out into encode_*() functions.