Refactoring long polling transport to be able to fix bug #3227

It might be possible for the the init message to arrive in response to subsequent /poll requests instead of the /connect request. With the code as is, this would lead to a transport initialization timeout since the `Poll` method isn't set up to trigger `InitReceived`.