os: throw when os.networkInterfaces() fails
fs: fix 'object is not a function' callback errors

Use a default callback if the user omitted one. Avoids errors like the one
below:

  fs.js:777
      if (err) return callback(err);
                      ^
  TypeError: object is not a function
          at fs.appendFile (fs.js:777:21)
          at Object.oncomplete (fs.js:297:15)

This commit fixes the behavior of fs.lchmod(), fs.lchown() and fs.readFile()
when the callback is omitted. Before, they silently swallowed errors.

Fixes #4352.
fs: add long stacktrace debugging facility

Enable long stacktraces if NODE_DEBUG=fs is set in the environment. Only
applies to the default rethrow callback; it's to help you find places where
you forgot to pass in a callback.
test: fix simple/test-debug-brk-file race condition

V8 debug agent needs some time to be ready and no longer sends the first event
break response to a debug client. We wait some time to connect the agent and
check its break status by obtaining breakpoint list and seeing if it exists on
line 0.
test: remove simple/test-child-process-fork2

The test assumes the parent and the child are scheduled fairly. Probably true
most of the time but not always, making it fail spuriously.

Bad test, remove it.
buffer: remove unused #includes
process: add getgroups(), setgroups(), initgroups()

DRY the getuid(), getgid(), etc. functions while we're at it.
tls, https: add tls handshake timeout

Don't allow connections to stall indefinitely if the SSL/TLS handshake does
not complete.

Adds a new tls.Server and https.Server configuration option, handshakeTimeout.

Fixes #4355.
doc: remove broken require.extensions example

Fixes #4384.
fs: Raise error when null bytes detected in paths

Reworking of @bnoordhuis's more aggressive approach.
lint

introduced in 5b65638.
http: protect against response splitting attacks
events: use null assignment instead of deleting property
events: use assigned variable instead of arguments

Always `arguments[0]` is used when `EventEmitter#emit` called.
Using assigned variable is faster than `arguments[0]`.
events: setMaxListeners() should not have side effects

This object initialization has been unnecessary since 12cf730b.

Ref #3803.
events: fix typos in code comment

- newListeners -> newListener
doc: Add nodejstr to community page
test: add common.mustCall function

Verifies that the callback gets invoked <n> times during the lifetime of the
test script.

This is a back-port of commit d0e6c3f from the master branch.
fs: fix ReadStream fd leak

Close the file descriptor when a read operation fails.

Fixes #4387.
fs: fix WriteStream fd leak

Close the file descriptor when a write operation fails.

Fixes #4387.