Update test config

Switch to testem for spec runner, update jasmine to 2.x.

Fix a few bugs in poller.