Updated app domain restart JS test to pass reliably with long polling

The issue was that the server restarted between polls so the reconnecting and
reconnected events were never fired on the client. We could possibly do more to
raise the reconnect events in this situation, but for now, I think this is by
design.

The test was fixed by ensuring that the app domain restart is not triggered
between polls.