Events: protection from stale events in eventport and devpoll.

Stale write event may happen if read and write events was reported both,
and processing of the read event closed descriptor.

In practice this might result in "sendfilev() failed (134: ..." or
"writev() failed (134: ..." errors when switching to next upstream server.

See report here:
http://mailman.nginx.org/pipermail/nginx/2013-April/038421.html


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