unix: silence STATIC_ASSERT compiler warnings

Newer versions of gcc complain about the definition of the zero element
array. Squelch that warning by turning it into a one element array.
windows: make timers handle large timeouts

Fixes a bug where timers with very large timeouts run on the next tick.
Based on a similar bug fix for unix (9b61939).

Fixes joyent/node#5101.
unix, windows: add uv_has_ref() function
build: avoid double / in paths for dtrace

GYP doesn't resolve or normalize the paths, resulting in the action not
firing if the path contains // so take care to avoid that
windows: remove superfluous assert statement
Merge branch 'v0.10'
unix: remove src/unix/cygwin.c

The cygwin build has been broken for a long time now and no one is
complaining, which strongly suggests that no one actually uses it.
Remove it.
windows: deal with the fact that GetTickCount might lag

We use GetQueuedCompletionStatus(Ex) to sleep the thread until the next
timer expires (provided that no other events happen before that).
However after waking up from a sleep the GetTickCount() return value may
not immediately reflect that some time has passed. This happens because
gqcs can sometimes sleep for periods shorter than the GetTickCount clock
resulution. This patch changes time tracking so the amount of time
waited by gqcs is taken into account.

This has the following advantages:

* Excessive loop iterations are avoided.
* Small timeouts are fired more precisely.
* The `loop-stop` test that used to be flaky on Windows now passes
  consistently.
unix: silence STATIC_ASSERT compiler warnings

Fix the following two warnings:

  src/unix/core.c:74:1: warning: ISO C90 forbids array
  'static_assert_failed' whose size can't be evaluated [-Wvla]
  src/unix/core.c:76:1: warning: ISO C90 forbids array
  'static_assert_failed' whose size can't be evaluated [-Wvla]
linux: don't use fopen() in uv_resident_set_memory()

RSS is a reflection of the number of pages that a process has mapped.
glibc implements fopen() in terms of mmap() which means that trying
to read the number of mapped pages changes it. Switch to open().
2013.04.24, Version 0.10.5 (Stable)

Changes since version 0.10.4:

* unix: silence STATIC_ASSERT compiler warnings (Ben Noordhuis)

* windows: make timers handle large timeouts (Miroslav Bajtoš)

* windows: remove superfluous assert statement (Bert Belder)

* unix: silence STATIC_ASSERT compiler warnings (Ben Noordhuis)

* linux: don't use fopen() in uv_resident_set_memory() (Ben Noordhuis)
ChangeLog: fix incorrect release date
Now working on v0.10.6
include: fix typo in comment in uv.h

Fixes #790.
stream: fix osx select hack

After latest twiddling, `stream->io_watcher.fd` doesn't contain a real
stream's file descriptior anymore. The one from `select_state` should be
used instead.

Zero-initialize `select_state->event` field.
stream: fix small nit in select hack, add test
build: link with libkvm on openbsd

The Makefile already did and now the gyp build does too. Fixes the
OpenBSD build of node.js.

Fixes joyent/node#5363.
stream: use harder sync restrictions for osx-hack

Synchronize harder to avoid excessive spins, invokations of async
callback and sporadic assertion failures on double-call of async
callback.
unix: fix EMFILE error handling

On Linux, the accept() and accept4() system calls checks for EMFILE
before checking for EAGAIN. Refine our EMFILE error handling tactic
to deal with that. Here is what used to happen:

 1. The event loop calls accept() and sees EMFILE.

 2. Libuv switches to EMFILE error handling mode. It closes a stashed
    file descriptor and calls accept() again.

 3. The accept() system call fails with EAGAIN.

 4. Libuv reopens the stashed file descriptor (reaching RLIMIT_NOFILE
    again) and returns control to the regular event loop.

 5. The regular event loop calls accept(), sees EMFILE and jumps to
    step 2 again. Effectively an infinite loop.

Avoid that by not calling accept() again when we've seen EAGAIN.

Fixes joyent/node#5389.
Merge remote-tracking branch 'origin/v0.10'

Conflicts:
	ChangeLog
	src/version.c