r21171: fixed a bug related to recursive event handling.
If this happens:
- two sockets are readable, and select/epoll/aio returns both of
them
- read event on socket1 is called
- inside that read event an event_loop_once is called, this returns that
socket2 is readable
- read event on socket2 is called
- event_loop_once returns
- top level event handler then calls read event on socket2 (as it
still has that listed as readable)
- read handler for socket2 returns zero byte read, which is
interpreted as end of file
- socket is incorrectly closed
this happened with ctdb, but it could happen anywhere (just
rarely). The fix is trivial - ensure we break out of the event loop
when we have been called recursively.