stream: start old-mode read in a next tick

Calling `.read()` in the same tick with `.on('data', ...)` may cause
users missing `error` events, because no `error` listeners were set yet.

fix #7618
string_decoder: Improve test coverage

The test cases are still essentially the same, but now all possible ways
of writing a buffer into the decoder are tested, which has exposed a few
failing scenarios that had not been discovered so far!
string_decoder: Fix failures from new test cases

This patch simplifies the implementation of StringDecoder, fixes the
failures from the new test cases, and also no longer relies on v8's
WriteUtf8 function to encode individual surrogates.
string_decoder: Add more comments
deps/v8: Apply REPLACE_INVALID_UTF8 patch

- https://codereview.chromium.org/121173009/
- https://code.google.com/p/v8/source/detail?r=18683

Note: The v8 test case did not cleanly apply, so it's missing from this
patch. I'm assuming this is not a problem if the v8 test suite is not
part of the node build / test system. If that's the case I'll fix it.
Otherwise the test case will be integrated once v8 is upgraded.
string_bytes: Guarantee valid utf-8 output

Previously v8's WriteUtf8 function would produce invalid utf-8 output
when encountering unmatched surrogate code units [1]. The new
REPLACE_INVALID_UTF8 option fixes that by replacing invalid code points
with the unicode replacement character.

[1]: JS Strings are defined as arrays of 16 bit unsigned integers. There
is no unicode enforcement, so one can easily end up with invalid unicode
code unit sequences inside a string.
src: replace usage of String::Utf8Value

v8::String::Utf8Value previously could allow invalid surrogates when
interpreting values.
npm: upgrade to v1.4.14
v8: shift heap space for aslr on 64bit

Previously we were only shifting the address space for ASLR on 32bit
processes, apply the same shift for 64bit so processes don't
get artificially limited native heap.
fs: remove duplicate check

Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014.06.05, Version 0.10.29 (Stable)

* openssl: to 1.0.1h (CVE-2014-0224)

* npm: upgrade to 1.4.10

* utf8: Prevent Node from sending invalid UTF-8 (Felix Geisendörfer)
  - *NOTE* this introduces a breaking change, previously you could construct
invalid UTF-8 and invoke an error in a client that was expecting valid
UTF-8, now unmatched surrogate pairs are replaced with the unknown UTF-8
character. To restore the old functionality simply have NODE_INVALID_UTF8
environment variable set.

* child_process: do not set args before throwing (Greg Sabia Tucker)

* child_process: spawn() does not throw TypeError (Greg Sabia Tucker)

* constants: export O_NONBLOCK (Fedor Indutny)

* crypto: improve memory usage (Alexis Campailla)

* fs: close file if fstat() fails in readFile() (cjihrig)

* lib: name EventEmitter prototype methods (Ben Noordhuis)

* tls: fix performance issue (Alexis Campailla)
Merge branch 'v0.10.29-release' into v0.10
Now working on 0.10.30
Merge remote-tracking branch 'upstream/v0.10'

Conflicts:
	AUTHORS
	ChangeLog
	deps/v8/src/api.cc
	deps/v8/src/unicode-inl.h
	deps/v8/src/unicode.h
	lib/_stream_readable.js
	lib/http.js
	src/cares_wrap.cc
	src/node.cc
	src/node_crypto.cc
	src/node_dtrace.cc
	src/node_file.cc
	src/node_stat_watcher.cc
	src/node_version.h
	src/process_wrap.cc
	src/string_bytes.cc
	src/string_bytes.h
	src/udp_wrap.cc
	src/util.h
	test/simple/test-buffer.js
	test/simple/test-stream2-compatibility.js
node: signing the CLA is no longer a requirement
Merge remote-tracking branch 'upstream/v0.10'
cluster: restore v0.10.x setupMaster() behaviour

In v0.10.x, process.argv and process.execArgv would only be
evaluated and copied into cluster.settings on the first call to
cluster.setupMaster() (either directly or via cluster.fork()),
allowing them to be modified as needed before initializing the
settings.

In 41b75ca the behaviour was changed so that these values are
initialized at the time of the first require('cluster').

Fixes #7670.

Signed-off-by: Trevor Norris <trev.norris@gmail.com>
test: regression test for cluser.setupMaster()

Tests for the behaviour in v0.10.x which allows process.argv changes
to be honoured by cluster.setupMaster().

Signed-off-by: Trevor Norris <trev.norris@gmail.com>
readline: remove doubled case.

Signed-off-by: Fedor Indutny <fedor@indutny.com>
tls_wrap: fix small obvious memory leak

Signed-off-by: Fedor Indutny <fedor@indutny.com>