Use an interface for client's connection field

This will let us mock out the connection in tests without spinning up a real
UDP connection. There may be better alternatives than this that I am not aware
of, though.