This moves the client-side loops are pretty much fully over to event-based only
(tmux.c and client.c) but server-side (server.c and friends) treats libevent as
a sort of clever poll, waking up after every event to run various things.
Moving the server stuff over to bufferevents and timers and so on will come
later.
buffered, don't accept any further data from the process running in the pane.
This makes tmux much more responsive when flooded with output, although other
buffers can still have an impact when running remotely.
Prompted by a query from Ranganathan Sankaralingam.
files from server.c (merging server-msg.c into the client file) and rather than
iterating over each set after poll(), allow a callback to be specified when the
fd is added and just walk once over the returned pollfds calling each callback
where needed.
More to come, getting this in so it is tested.