Print human readable error messages for socket errors in the libevent driver. See #449.

Also added some code to get nice error messages/exceptions when no event loop is active.