Added a guard in the JS client to prevent the stop reconnecting functionality to persist after connection.stop

- If a dev calls connection.stop in the stateChanged function while in
the reconnecting state the stopReconnectingTimeout would not need to be
set because the state may not be in reconnecting
Compiled stop reconnecting timeout guard to minified files
Added a JS test to ensure that the guard implemented works (#1358).