Refactors initSocket() so that logic and data is in its own SocketConnectionWatcher class.

(It's not a great name.) This code hasn't been tested yet, except to
confirm that it doesn't break the existing (entirely unrelated) tests.

Also eliminates use of `print`, replacing with loggers.
Adds a sockets.py example script which can listen for activity in Charcoal HQ.
Work on browser and wrapper to present similar, working, interfaces for polling and for using sockets.

The browser allows you to view the activity data for each, and the
wrapper consumes those to allow you to respond to events from a specific
room.

This expands our test_live_messages to also ensure we can see the
test message using the socket.
Prevent live message tests from failing if there's an unexpected type of event at an inconvenient time.
Merge pull request #27 from jeremybanks/sockets

socket watching, with same interface as http polling
Merge pull request #29 from Manishearth/test

Forward test to master