Networking

this pr extracts the new rpc based replication protocol.
There are some fairly radical changes. There is no longer a "replication stream" per se,
instead two peers connect... and then query each other. Which can mean replicating data.

But also, it will be very easy to add other gossip protocols, and since the gossip plugin is potentially aware of all the current connections, and can initiate new connections, then it would be possible to implement other protocols as other plugins.

So attachments will just be another rpc protocol plugin.

This isn't finished yet, I'll need add websockets, so it can be used as the backend for phoenix,
and we'll need to fix auth.