linux: handle EPOLLHUP without EPOLLIN/EPOLLOUT

Work around an epoll quirk where it sometimes reports just the EPOLLERR
or EPOLLHUP event.  In order to force the event loop to move forward,
we merge in the read/write events that the watcher is interested in;
uv__read() and uv__write() will then deal with the error or hangup in
the usual fashion.

Fixes #982.

This is a back-port of commit 24bfef2 from the master branch.
unix: fix reopened fd bug

When fd is closed and new one (with the same number) is opened inside
kqueue/epoll/port loop's callback - stale events might invoke callbacks
on wrong watchers.

Check if watcher was changed after invocation and invalidate all events
with the same fd.

fix #826
core: fix fake watcher list and count preservation

Fake watcher list and count should be preserved only if
`loop->watchers` was already allocated.
Merge branch 'v0.10'

Conflicts:
	build.mk
	src/unix/core.c
	src/unix/darwin.c