Worker registers itself on every connect event

This is a tidied version of the pull request I made earlier (#13). I removed the listener for the reconnect event to make the code simpler. The worker will now send `RESET_ABILITIES` if it is not connecting for the first time and `CAN_DO` on every connect event.

I also refactored the test helper to match cs idioms.
The only reason I didn't want to send `RESET_ABILITIES` on the first connect was that it adds a minuscule amount of overhead. I have removed `first_connect` in 438007e0426998e05e27e3d0732d520a1f2ee230.