Encapsulation for tests. Modularization.

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