windows: map WSAESHUTDOWN to UV_EPIPE

This is a back-port of commit 483043b from the master branch.
linux: use /proc/cpuinfo for CPU frequency

Obtain the CPU frequency from /proc/cpuinfo because there may not be any
cpufreq info available in /sys. This also means that the reported CPU speed
from now on is the *maximum* speed, not the *actual* speed the CPU runs at.

This change only applies to x86 because ARM and MIPS don't report that
information in /proc/cpuinfo.

Fixes #588.

This is a back-port of commit 775064a from the master branch.
windows: add flag for hiding windows created by a spawned process

Closes GH-627
unix: add uv_backend_fd() and uv_backend_timeout()

This can be used in conjuction with uv_run_once() to poll in one thread and run
the event loop's event callbacks in another.

Useful for embedding libuv's event loop in another event loop.
unix: change uv_backend_timeout() prototype

* change return value to signed int
* constify loop argument
Remove *.mk and *.Makefile from .gitignore list

The *.mk and *.Makefile files generated by gyp are stored in $TOPLEVEL/out now.

Fixes #636.
windows: fix uv_backend_fd() return value

uv__new_artificial_error() returns a uv_err_t, not an int, and we can't use
uv__set_artificial_error() because the uv_loop_t argument is const.
unix: initialize thread pool mutex and condvar

It accidentally worked before this commit on Linux but not on OS X.

Fixes #637.
test: fix finished consumer number check
unix: remove unnecessary static var init

wq doesn't have to be initialized, init_once() takes care of that.

Remove the initialization so it goes into .bss instead of .data.
sunos: fix uv_getaddrinfo() NULL pointer dereference
Merge branch 'v0.8'

Conflicts:
	src/unix/core.c
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()