This commit does several things:
* check for LIBEV_ERROR flags on read and write notifications.
(Typically socket.recv() or socket.send() will error correctly,
but it's safer to also check for this flag in multithreaded
environments.)
* Use a separate lock for maniuplating the queue of pending
messages to be sent
* Notify the event loop of watcher changes more frequently in
order to avoid waiting to execute pending events