unix: fix accept() EMFILE error handling

Fix a bug that was introduced in commit 3ee4d3f ("unix, windows:
return error codes directly") and add a regression test for good
measure.

Hat tip to Fedor for pointing out the issue.

Fixes #1007.
test: back-port EMFILE test from master branch

Back-port the test from commit 27795cf from the master branch ("unix:
fix accept() EMFILE error handling").
Merge remote-tracking branch 'origin/v0.10'

Conflicts:
	build.mk
	test/test-emfile.c
	test/test-list.h
gitignore: ignore *.pyc files

The gyp build on Windows produces a *.pyc file as of commit 991409e.
linux: fix up SO_REUSEPORT back-port

Commit 3d2c820 back-ports a patch from the master branch that disables
the use of SO_REUSEPORT on Linux for reasons mentioned in the commit
log.

Unfortunately, the back-port was incomplete; another setsockopt() call
site in src/unix/udp.c was overlooked.  This commit rectifies that.

Hat tip to Luca Bruno for helping troubleshoot the issue.
fsevents: fix subfolder check

First of all, a bit of explanation of what happens there:

1. FSEvents emits absolute paths to changed files or directories
2. We cut off the first part of such paths, which is equal to handle's
   real path ('/dir/subdir/subsubdir`, without trailing slash)
3. Then, if we are running in non-recursive mode, we discard paths that
   have slashes ('/') as a non-first character in them
build: make `./gyp_uv.py -f eclipse` work

The eclipse backend (like the ninja backend) does not support the
--generator_output switch.
Merge remote-tracking branch 'origin/v0.10'

Conflicts:
	src/unix/udp.c
doc: Removed use of gendered pronouns
Merge branch 'v0.10'
fs-event: fix invalid memory access

file_info->FileName is not null terminated.
windows/timer: fix uv_hrtime discontinuity

Large performance counter frequency values would cause overflows, even
when 64-bit integers were used to do the multiplication with NANOSEC.
Fix this by using floating point math instead.

Fixes #850
Merge branch 'v0.10'
doc: add guidelines for contributing
doc: fixed typo in readme

The link to nodejs.org in README.md was broken.
doc: document how to run tests
unix: fix various memory leaks and undef behavior

Kindly suggested by `cppcheck`.
build: add support for pkg-config
build: hide dtrace rules unless needed

When using configure, there are situations where libuv will attempt
to build uv-dtrace.h, even if it is configured with --disable-dtrace.
For example, if libuv is first configured with dtrace enabled, then
built, the .deps files will contain references to include/uv-dtrace.h.
After a make clean and configure --disable-dtrace, the build will still
attempt to create include/uv-dtrace.h and fail. make will see the
dependency reference (which survives the make clean), use the rule
(which is always added to the Makefile), and fail since DTRACE is not
defined.

This commit protects the rules to make uv-dtrace.h with the proper
conditionals to ensure the rules are not written if --disable-dtrace
is chosen.

Fix #963.
build: check if pkg-config is installed

Also, don't check for a specific pkg-config version, since libuv doesn't
use pkg-config itself