This makes it more clearly the pattern in the Zulip codebase, and thus decreases the risk of accidentally doing database queries.
Fixes #729.
This furthers the overall goal of moving all the Tornado-specific code to zerver/tornado/.
- Add base tornado test case class. - Add test for websocket connection. - Add test for websocket authentication. - Add test for sending private message with websocket. - Add test for sending stream message with websocket. Fixes #2230