Encapsulation for tests. Modularization.

Encapsulating core stuff in main so that we can use Jasmine for testing, later.
Breaking out common IRC client code into its own library.
Renaming OptimistBot.js