Merge of r5017: fixed null dereference with resolver and poll.

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/branches/stable-1.2@5063 73f98a42-aea0-e011-b76d-00259023448c