Added a reconnect error detection algorithm

- The algorithm waits progressively longer to trigger reconnect
depending on how many times the transport reconnects and then instantly
fails.
- It ultimately depends on the Error handler to be triggered before the
Reconnected event trigger to keep the transport in the "Reconnecting"
state.  This will always work because the Reconnect trigger will wait
longer the more times it fails to reconnect

#1809
Added a JS functional test to verify correctness of infinite reconnect fix

#1809
Changed back off algorithm to exponential

#1809