Handle transport failures occurring in the connecting state

- In the event of any transport error prior to the init message,
  the transport should immediately stop and allow the connection to
  fall back to another transport.
- In the event of any transport error during the start request,
  the entire connection should immediately be stopped

#2902

This is the JS equivalent to https://github.com/SignalR/SignalR/pull/3263
Would this ever be undefined?