Simplify message construction in clio_endpoint_send_msg.

Much easier to just use open_memstream to construct message strings
than all that realloc nonsense. Removed the bytes sent param in the
http response, but may readd it. Also now return the number of bytes
written to make the usage more like the system write.

TODO: add multiple levels (INFO, ERR, etc) to the send_msg function.