Now prefixes each message with the message length.

Also removed the "ack", it caused way more problems than it solved. If a
string is larger than 1K, it will be split up in chunks, and sent with a
short delay in between.
Doesn't handle message until all of it is received.

Each message is now prefixed with a length (by the server), so it's
easier to know when a complete message has been received. Also made sure
shared-buffer stays alive after major-mode change.