optimise RelayConnection read/write

Wait indefinitely for new outgoing messages instead of waking up
4 times a second.

Avoid making multiple copies of byte arrays when reading messages.