test: move two tests from simple/ to internet/

Fixes #5876.
src: fix windows build error from 221c689e

Just forward declare struct sockaddr, the struct is never actually
dereferenced in src/node_internals.h.

Before this commit, it included sys/socket.h but that header doesn't
exist on Windows.
v8: upgrade to v8 3.20.7
src: update v8 build requirements

In v8 3.20.4 build/common.gypi was moved to build/toolchain.gypi and
build/features.gypi.
v8: reapply floating patches
util: removed duplicated isArray check
stream: Simplify flowing, passive data listening

Closes #5860

In streams2, there is an "old mode" for compatibility.  Once switched
into this mode, there is no going back.

With this change, there is a "flowing mode" and a "paused mode".  If you
add a data listener, then this will start the flow of data.  However,
hitting the `pause()` method will switch *back* into a non-flowing mode,
where the `read()` method will pull data out.

Every time `read()` returns a data chunk, it also emits a `data` event.
In this way, a passive data listener can be added, and the stream passed
off to some other reader, for use with progress bars and the like.

There is no API change beyond this added flexibility.
buffer: slice on zero length buffer

SlowBuffer(0) passes NULL instead of doing malloc(0). So when someone
attempted to SlowBuffer(0).slice(0, 1) an assert would fail in
smalloc::SliceOnto.

It's important that the check go where it is because the resulting
Buffer needs to have external array data allocated. In the case a user
tries to slice a zero length Buffer it will also have NULL passed as the
data argument.

Also fixed where the .parent attribute was set for zero length Buffers.
There is no need to track the source of slice if the slice isn't
actually occurring.
crypto: Add test for sha.write(''); sha.end()
fs: uids and gids must be unsigned ints

Before this commit, fs.chown() and fs.fchown() coerced the uid and gid
arguments to signed integers which is wrong because uid_t and gid_t are
unsigned on most all platforms and IDs that don't fit in a signed
integer do exist.

This commit changes the aforementioned functions to take unsigned ints
instead.  No test because we can't assume the system has [GU]IDs that
large.

This change depends on joyent/libuv@d779eb5.

Fixes #5890.
src: os: use Number::New() for CPU info

The return values from uv_cpu_info() don't necessarily fit in a 32 bits
signed integer.

Fixes #5732.
buffer: revert length and parent check

In a rush to implement the fix 35e0d60 I overlooked the logic that
causes 0-length buffer instantiation to automatically not assign the
parent regardless.
buffer: misc logic simplification

Includes:
* No need for `typeof` when checking undefined.
* length is coerced to uint so no need to check if < 0.
* Stay consistent and always throw `new` errors.
* Returning offset + magic number in every write is error prone. Instead
  return the central write function which returns the correct offset.
smalloc: add external to alloc with callbacks

Forgot to actually assign cb_info to the External in smalloc::Alloc()
that accepts a callback to be run in the weak callback.
src: cares_wrap: remove two unused variables
src: rename macros.py to notrace_macros.py

This incarnation of macros.py is only used to disable the (d)trace
macros. Rename it so it better reflects its purpose. A new macros.py
will be added in a follow-up commit.
tools: fix js2c macro expansion bug

If the same macro was used twice in close proximity, the second one
didn't get expanded.
lib: macro-ify type checks

Increases the grep factor. Makes it easier to harmonize type checks
across the code base.
src: move NODE_MODULE_VERSION to node_version.h
npm: Upgrade to v1.3.5