Separating Listener, and making it event-based.

Also made a test-suite for it.

@jjackson26 @swarajban Take a look.  The code was moved from main.js to listener.js mostly untouched, except for some refactoring to make it event-based, and to separate out the _initializeRecognizer logic.  With the spec and tests, we should be able to make changes more confidently.

There's more I'd like to put in the test suite, but it's not worth holding up the rest of the bugs for.
I was a little torn whether it should be public or private, so i left it public but undocumented.  But yeah, i'll make it private until we decide otherwise.