Fixing race condition in subscribing to socket events
Fixing race condition in subscribing to socket events

When using VSCode I found that a single `cordova.exec` call from APP_HOST would sometimes trigger two responses from SIM_HOST. This turns out to be because `onSimHostReady` could be called twice without `resetAppHostState` called in between. As a fix, this commit ensures that each handler is only registered once.
Microsoft/taco-simulate-server,Microsoft/taco-simulate-server,TimBarham/cordova-simulate,TimBarham/cordova-simulate