Captured several long polling timeouts that are then cleared on stop.

- Also added two fields to the private data field of a connection object.

#2505
Added a test to verify that starting/stopping a connection while reconnecting does not result in simultaneous polls attempting to connect.

#2125
Addressed code review comments.

- Added an extra check after long polling error handler trigger to ensure that multiple connections do not occur.

#2505