Events: fixed null pointer dereference with resolver and poll.

A POLLERR signalled by poll() without POLLIN/POLLOUT, as seen on
Linux, would generate both read and write events, but there's no
write event handler for resolver events.  A fix is to only call
event handler of an active event.


git-svn-id: svn://svn.nginx.org/nginx/trunk@5017 73f98a42-aea0-e011-b76d-00259023448c