Infrastructure for transmitting messages over the wire.

Messages are composed of a header and a data segment. The header
contains the message type, the size of the message being
sent/received and a CRC64 checksum of the message. Various message
types subclass BaseMessage and need to implement the recv method
which is passed in a data segment and returns an instance of the
BaseMessage subclass and the send method which serialises the
message instance and writes it to a file descriptor.

The same methods can be used for both on-disk serialisation and
network transmission.

Added support for allocating custom remote client state machines
in the core server library. Since the server uses an event-based
architecture with non-blocking sockets, the message will be
received in small incomplete parts which means we need to keep
track of how much we read and store it within the remote client
state machine.