child_process: fix sending utf-8 to child process

In process#send() and child_process.ChildProcess#send(), use 'utf8' as
the encoding and correctly handle partial character sequences by
introducing a StringDecoder. Before this commit, it used 'ascii' and
partial sequences were dropped or corrupted.

This is a back-port of commit 44843a6 from the v0.10 branch.

Fixes #4999 and #5011.
tls: Re-enable check of CN-ID in cert verification

RFC 6125 explicitly states that a client "MUST NOT seek a match
for a reference identifier of CN-ID if the presented identifiers
include a DNS-ID, SRV-ID, URI-ID, or any application-specific
identifier types supported by the client", but it MAY do so if
none of the mentioned identifier types (but others) are present.
http: Avoid EE warning on ECONNREFUSED handling

This is a back-port of the same fix in
deb1dc279d49463e13af44feed45c79ae0f379f9, for v0.8.
npm: Upgrade to v1.2.18
2013.04.09, Version 0.8.23 (maintenance)

* npm: Upgrade to v1.2.18

* http: Avoid EE warning on ECONNREFUSED handling (isaacs)

* tls: Re-enable check of CN-ID in cert verification (Tobias Müllerleile)

* child_process: fix sending utf-8 to child process (Ben Noordhuis)

* crypto: check key type in GetPeerCertificate() (Ben Noordhuis)

* win/openssl: mark assembled object files as seh safe (Bert Belder)

* windows/msi: fix msi build issue with WiX 3.7/3.8 (Raymond Feng)
Merge branch 'v0.8.23-release' into v0.8
Now working on 0.8.24
handle_wrap: fix NULL pointer dereference

Fix a NULL pointer dereference in src/handle_wrap.cc which is really a
use-after-close bug.

The test checks that unref() after close() works on process.stdout but
this bug affects everything that derives from HandleWrap. I discovered
it because child processes would sometimes quit for no reason (that is,
no reason until I turned on core dumps.)

This is a back-port of commit ccd3722 from the v0.10 branch.
test: make stdout-close-unref work in test runner

process.stdout isn't fully initialized yet by the time the test starts
when invoked with `python tools/test.py`. Use process.stdin instead and
force initialization with process.stdin.resume().

This is a back-port of commit 2e70dda from the v0.10 branch.
http: Don't try to destroy nonexistent sockets

Fixes #3740

In the case of pipelined requests, you can have a situation where
the socket gets destroyed via one req/res object, but then trying
to destroy *another* req/res on the same socket will cause it to
call undefined.destroy(), since it was already removed from that
message.

Add a guard to OutgoingMessage.destroy and IncomingMessage.destroy
to prevent this error.