Add support for multipart messages and remove custom framing for pub/sub

I've changed the pub/sub code to remove the custom framing using a null byte and added code to send and receive multipart messages.
I've ensured API-level compatibility as well as making sure old versions can read data sent by the old one (thanks to the existing compatibility code there). But of course older versions won't be able to read multipart messages sent by this one.