cluster: refactor ipc protocol from cluster

lib/message now encapsulates the request/response message protocol, and
lib/cluster attaches it to a node cluster.