Replicated KV Store

Implement the primary replica role so that it correctly responds to the
KV protocol messages without considering persistence or replication.