Fix an issue signalling the client socket of an error.
Fix an issue signalling the client socket of an error.

In the case where we must cancel the underlying client request and
the client had an error handler attached which threw the error we
were not correctly catching the exception. Protect the emit() and
ensure completion by unconditionally updating timeline & rejecting.

alexjeffburke/unexpected-mitm,unexpectedjs/unexpected-mitm