tls: emit `clientError` on early socket close

fix #6903
tls_wrap: propagate errors to write callbacks

fix #6903