tls: process accumulated input

When creating TLSSocket on top of the regular socket that already
contains some received data, `_tls_wrap.js` should try to write all that
data to the internal `SSL*` instance.

fix #6940
v8: upgrade to 3.22.24.17
lint: use reinterpret_cast, not C-style casts
tls: emit `clientError` on early socket close

fix #6903
tls_wrap: propagate errors to write callbacks

fix #6903
Merge pull request #2 from joyent/master

merge from upstream