Refactor connection callbacks

Rather than modifying the other ev_io_watcher in (client|server)_rx and
(client|server)_tx, update both watchers after all the state changes
are complete. Also abstract out common receive and transmit loops into
a common (7 argument) function. Overall this seems to make the state
changes easier to reason about.
Remove while recv/send loops

Based on strace counters subsequent calls to recv() or send() where
never successful.
Combine client and server callbacks

Remove 7 argument rx_tx() function, instead set local variables based on
which watcher's callback was called.