Ensure firstRequest is passed to api._setupUser so that pending requests are cleared if necessary
Simplify tests by moving req and res to beforeEach.
Merge pull request #409 from Standard8/fix_reconnect_long_polling

Fix long polling - clear pending requests when a client reconnects

r=@n1k0