make repl compatible with domains

The try/catch in repl.js keeps any active domain from catching the
error.  Since the domain may not even be enterd until the code is run,
it's not possible to avoid the try/catch, so emit on the domain when an
error is thrown.
doc: Add crypto.pseudoRandomBytes, fix typo
stream: Writable.end(chunk) after end is an error

Calling end(data) calls write(data).  Doing this after end should
raise a 'write after end' error.

However, because end() calls were previously ignored on already
ended streams, this error was confusingly suppressed, even though the
data never is written, and cannot get to the other side.

This is a re-hash of 5222d19a11ed0e29d207da0e8c9c8e0e3b18ad78, but
without assuming that the data passed to end() is valid, and thus
breaking a bunch of tests.
cluster: Rename destroy() to kill(signal=SIGTERM)

Fix #4133, bringing the cluster worker API more in line with the
child process API.
link to LevelUP modules wiki page, not level-hooks
link to LevelUP modules wiki page, not level-hooks
dns: fix ReferenceError in resolve() error path

A typo in the variable name makes it throw a ReferenceError instead of
the expected "Unknown type" error when dns.resolve() is passed a bad
record type argument.

Fixes the following exception:

  ReferenceError: type is not defined
    at Object.exports.resolve (dns.js:189:40)
    at /Users/bnoordhuis/src/master/test/simple/test-c-ares.js:48:9
    <snip>
stream: Don't require read(0) to emit 'readable' event

When a readable listener is added, call read(0) so that data will flow in, up to
the high water mark.

Otherwise, it's somewhat confusing that you have to listen for readable,
and ALSO call read() (when it will certainly return null) just to get some
data out of the stream.

See: #4720
win/msi: make msi build work when spaces are present in the path
doc: add url.resolve() usage examples

Fixes #4913.
events: remove type check for event type

Strict checking for typeof types broke backwards compatibility for other
libraries. This reverts those checks.

The subclass test has been changed to ensure all operations can be
performed on the inherited EE before instantiation. Including the
ability to set event names with numbers.
events: code consistency

v8 likes when smaller functions have a single return point, and cleaned
up the single non-strict check.
events: loop backwards in removeListener

`removeAllListeners` is removing events from end to start. Therefore
it spends O(n^2) time, since `removeListener` is searching from start to
end.
cluster: propagate bind errors

This commit fixes a bug where the cluster module fails to propagate
EADDRINUSE errors.

When a worker starts a (net, http) server, it requests the listen socket
from its master who then creates and binds the socket.

Now, OS X and Windows don't always signal EADDRINUSE from bind() but
instead defer the error until a later syscall. libuv mimics this
behaviour to provide consistent behaviour across platforms but that
means the worker could end up with a socket that is not actually bound
to the requested addresss.

That's why the worker now checks if the socket is bound, raising
EADDRINUSE if that's not the case.

Fixes #2721.
Merge remote-tracking branch 'origin/v0.8'
deps: upgrade libuv to 0b26af3
Update domain.markdown
win/openssl: mark assembled object files as seh safe

There are no unsafe structured exception handlers in object files
generated from hand-crafted assembly - because they contain no exception
handlers at all.
Revert "build, windows: disable SEH"

This is no longer necessary - the underlying issue was fixed in 01fa5ee.
This reverts commit d87904286024f5ceb6a2d0d5f17e919c775830a0.
process: invoke EventEmitter on `process`

This properly sets the `_maxListeners` property, which
fixes the max listener warning. Closes #4924.