Add a `FakeConnection` for testing

This adds a `FakeConnection` that has the same interface as a
`Connection` but doesn't work on a real socket. This is useful
for dependency injecting into tests to get the behavior of a
protocol connection without the overhead of using a real socket.