fsevents: use native character encoding file paths

Create file paths with CFStringCreateWithFileSystemRepresentation(),
not CFStringCreateWithCString().

Reapplies 3780e12 ("fsevents: support japaneese characters in path")
from the v0.10 branch.  Was dropped in the last v0.10 -> master merge
for failing to apply.
build: add test/test-watcher-cross-stop.c to list

Overlooked in the last v0.10 -> master merge.
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.
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.
windows: use _snwprintf(), not swprintf()

Drop the _CRT_NON_CONFORMING_SWPRINTFS hack and just use _snwprintf().

It's a long and complicated story but the gist of it is that the MS CRT
had a swprintf() function before ISO C did, with a different function
prototype to boot: the ISO C one takes a |size| argument, the MS one
does not.

The function prototype that's exported by mingw and mingw-w64 depends
on the mingw version and the _CRT_NON_CONFORMING_SWPRINTFS define.
If they don't match up, you get the wrong prototype and things will
crash at run-time.

Reduce the phase space by sidestepping the whole issue: drop swprintf()
altogether and use _snwprintf() from now on.

Fixes #990.
fsevents: use FlagNoDefer for FSEventStreamCreate

Otherwise `FSEventStreamCreate()` will coalesce events, even if they're
happening in the interval, bigger than supplied `latency`. In other
words, if this flag is not set events will happen in separate callback
only if there was a delay bigger than `latency` between two consecutive
events.
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
2013.11.13, Version 0.10.19 (Stable)

Changes since version 0.10.18:

* darwin: avoid calling GetCurrentProcess (Fedor Indutny)

* unix: update events from pevents between polls (Fedor Indutny)

* fsevents: support japaneese characters in path (Chris Bank)

* linux: don't turn on SO_REUSEPORT socket option (Ben Noordhuis)

* build: fix windows smp build with gyp (Geert Jansen)

* linux: handle EPOLLHUP without EPOLLIN/EPOLLOUT (Ben Noordhuis)

* unix: fix reopened fd bug (Fedor Indutny)

* core: fix fake watcher list and count preservation (Fedor Indutny)
Now working on v0.10.20
unix: unbreak bsd build after bbccafb

Unbreak the build on the BSDs after commit bbccafb.  Move the new
uv__platform_invalidate_fd() function from src/unix/darwin.c to
src/unix/kqueue.c.
Merge remote-tracking branch 'origin/v0.10'

Conflicts:
	AUTHORS
	ChangeLog
	src/unix/darwin.c
	src/version.c
build: add test-tcp-close-accept.c to test deps

Add test/test-tcp-close-accept.c to the dependency list of the
`make check` target of the autotools build.
test: test fsevents error reporting

Create a lot of `FSEventStream`s to make `FSEventStreamStart()` fail.
Fetch the error code and verify that it is correct.