add a more efficient way to dialogo with stdio and streams

Rather than trying to serialize/deserialize JSON everytime to pass a simple
message in streams wich can be expensive along the time use a simpler protocol
to pass message so we don't have to deserialize binary data.

This message protocol is partly inspired by the way git sore the blobs on the
disk. A message is constructed with a header that starts with the magic bit
telling us the protocol version, then it add a space followed by the type of
the message and another space followed by the message id and finally a null
byte:

        V1 type messageid\0

The body follow the null byte. Then a full message is:

        V1 type messageid\0body

This simple messaging protocol allows us to pass any kind of blob as a body
and eventually a json while still beeing able to know the type of the message.