windows: add some error code mappings
windows: improve / fix uv_interface_addresses

* If GetAdaptersAddresses() failed, it would return UV_OK nonetheless,
  but the `adresses` and `count` out parameters would not be set.

* When adapters were enabled or added in between the two
  GetAdaptersAddresses() calls, it would fail.

* In case of an out of memory situation, libuv would crash with a fatal
  error.

* All interface information is now stored in a single heap-allocated
  area.
windows: add some error code mappings
windows: improve / fix uv_interface_addresses

* If GetAdaptersAddresses() failed, it would return UV_OK nonetheless,
  but the `adresses` and `count` out parameters would not be set.

* When adapters were enabled or added in between the two
  GetAdaptersAddresses() calls, it would fail.

* In case of an out of memory situation, libuv would crash with a fatal
  error.

* All interface information is now stored in a single heap-allocated
  area.
build: fix `make libuv.so CFLAGS=<options>`

Running a make target that builds the shared object while overriding the CFLAGS
variable from the command line, would fail with a relocation error:

   relocation R_X86_64_32 against `.text' can not be used when making a shared
   object; recompile with -fPIC

Fix that by adding -fPIC unconditionally.
build: rename LINKFLAGS to LDFLAGS
unix: only set SO_REUSEADDR on tcp listen sockets

Avoid the extra syscall, it's a no-op for non-listening sockets.

At least, it should be - it remains to be investigated if a FreeBSD kernel bug
affects ephemeral port allocation inside connect(). See [1] for details.

[1] http://www.freebsd.org/cgi/query-pr.cgi?pr=174087
unix: add uv_cancel()
unix: use select() for specific fds on OS X

kqueue(2) on osx doesn't work (emits EINVAL error) with specific fds
(i.e. /dev/tty, /dev/null, etc). When given such descriptors - start
select(2) watcher thread that will emit io events.
unix: rework uv_cancel() api

Bert Belder informs me the current approach where a request is immediately
cancelled, is impossible to implement on Windows.

Rework the API to always invoke the "done" callback with an UV_ECANCELED error
code.
unix: fix event loop stall

Fix a rather obscure bug where the event loop stalls when an I/O watcher is
stopped while an artificial event, generated with uv__io_feed(), is pending.
test: fix -Wunused-result warnings
test, bench: replace strlen() with sizeof()
test, bench: remove unused includes
sunos: properly disarm PORT_LOADED fsevent watcher

Fixes a segmentation fault when the watched entity is changed after the watcher
has been closed.
Merge branch 'v0.8'
unix: don't memset(0) in uv_udp_init()

It's inconsistent with other init functions. In particular, it clobbers the
data field.

Fixes #655.
kqueue: ignore ENOENT error

File descriptor might be closed during callback, all events that was reported
before the callback are not valid and trying to remove them will result
in ENOENT. This error can be safely ignored.
unix: disable relaxed accept() by default

Don't use the relaxed accept() algorithm introduced in be2a217 unless
explicitly requested. It causes a 50+% performance drop on some node.js
benchmarks:

  $ alias bench='out/Release/node benchmark/http_simple_auto.js \
    -c 10 -n 50000 bytes/1 2>&1 | grep Req'

  $ UV_TCP_SINGLE_ACCEPT=0 bench
  Requests per second:    12331.84 [#/sec] (mean)

  $ UV_TCP_SINGLE_ACCEPT=1 bench
  Requests per second:    3944.63 [#/sec] (mean)
Implemented uv_run2

Allows for running the event loop in 3 modes:
  * default: loop runs until the refcount drops to zero
  * once: poll for events only once and block until one is handled
  * nowait: poll for events only once but don't block if there are
    no pending events