Ensure long polling doesn't drop events at the end of the long polling cycle

This fixes the intermittent failure in [this card](https://trello.com/c/giW1s9tL)

Currently we have an issue where long polling can drop events at the end of its cycle. The flow at issue is:

* Long polling times out with its normal timeout (4s in tests)
* The timeout hasn't set the fact that the long polling has been resolved
* A new message is ready to be sent
* The message is attempted to be sent, even though there is no long polling connected, because the client hasn't reconnected since the initial resolution of the long polling.
* The client then re-connects

=> The message has been lost

This is simply fixed by adding a this.resolved = true to the waiter when the long polling end timeout occurs.

This PR also adds some trace level debug for help with debugging events in future.