tls: fix sporadic hang and partial reads

Do not decrement size in read loop, its used later, when comparing to
`bytesRead`.

fix #6270

NOTE: Original patch contributed by @roadrunner2
src: turn uv_pipe_open() failures into exceptions

uv_pipe_open() is unlikely to fail but when it does, the failure should
not be quietly ignored.  Raise the error as an exception.

See joyent/libuv#941.
2013.09.30, Version 0.10.20 (Stable)

* tls: fix sporadic hang and partial reads (Fedor Indutny)
  - fixes "npm ERR! cb() never called!"
Merge branch 'v0.10.20-release' into v0.10
Now working on 0.10.21
blog: Post for v0.10.20
doc: link to pre-built binaries, add install note

lLnk to http://nodejs.org/download/ and add a short primer on how to
extract the tarballs.

Fixes #6292.
src: raise maximum file descriptor limit

Do a binary search for the maximum RLIMIT_NOFILE.  Works around the
low, low limits on certain high, high-priced devices from Cupertino, CA.
src: notify V8 profiler when we're idle

Inform V8's CPU profiler when we're idle.  The profiler is
sampling-based but not all samples are created equal; mark the wall
clock time spent in epoll_wait() and friends so profiling tools can
filter it out.  The samples still end up in v8.log but with state=IDLE
rather than state=EXTERNAL.
src: only start idle notifier when profiling

The previous commit adds a notifier that tells the V8 profiler when
node.js is idle, i.e. when it's about to start sleeping in the
platform's equivalent of epoll_wait().

This commit adds a heuristic that only starts the notifier when the
V8 profiler is started from the command line.
src: add JS start/stop methods for idle notifier

The previous commit changes the profiler idle notifier so that it only
gets started when a --prof or --prof_lazy argument is specified on the
command line.

This commit adds two internal methods to the process object that allows
one to start and stop the idle notifier programmatically.
src: fix up after botched merge conflict

Mea culpa, I didn't properly resolve a merge conflict in the last two
commits.  The resulting segmentation fault only happened on Linux and
only sometimes.

Fixes #6306.
doc: add warning to fs.exists() documentation

Warn against the open-if-exists anti-pattern, it's susceptible to
race conditions.
debugger: count space for line numbers correctly
v8: ugprade to 3.20.17.14
fs: fix fs.truncate() file content zeroing bug

fs.truncate() and its synchronous sibling are implemented in terms of
open() + ftruncate().  Unfortunately, it opened the target file with
mode 'w' a.k.a. 'write-only and create or truncate at open'.

The subsequent call to ftruncate() then moved the end-of-file pointer
from zero to the requested offset with the net result of a file that's
neatly truncated at the right offset and filled with zero bytes only.

This bug was introduced in commit 168a5557 but in fairness, before that
commit fs.truncate() worked like fs.ftruncate() so it seems we've never
had a working fs.truncate() until now.

Fixes #6233.
zlib: fix write request reference counting

Keep track of the reference count, don't make the wrapper object weak
when there are pending write requests.  Fixes a regression from c79d516.
dtrace, mdb_v8: support more string, frame types

This change makes several improvements to the ustack helper and MDB
support:

- ustack helper and MDB: add support for two-byte strings
  (necessary to print many filenames in stacktraces in 0.10 and later).
- ustack helper: fix position numbers, which were off by a factor of two
- ustack helper: fix frames with undefined Scripts (e.g., "RegExp")
- ustack helper: add stub frames
- MDB: add support for sliced strings
- MDB: sync up with changes from the illumos version of the module

Fixes #6309
Closes #6318
mdb_v8: remove useless check
dtrace: backport two byte string fix

This is a partial backport of 5921158

Re #6309
Closes #6319