Adding reconnect capability into javascript library, so that apps attempt to reconnect to server if they loose the connection.
added reconnect functionality into the javascript library - by default it is turned on. Also added a random number to the end of the app name in the example apps, when users do not customize the name via query string.