Use Mocha for javascript testing (browser + node).

Hi @jhlywa! I noticed you want to switch to an existing js testing framework so I ported the tests over to use Mocha, which runs in both the browser and node.js.
http://visionmedia.github.com/mocha/
https://github.com/visionmedia/mocha

I was also considering Jasmine, but decided to stick with the TDD style of the original tests.
http://pivotal.github.com/jasmine/

Running tests in the browser works almost the same way as before. Just open tests.html and the tests will start right away.

For node.js, first run `npm install` to install mocha and chai locally. Then run `make test`.

Mocha's quite customizable, so it's easy to change how the test outputs are presented. Give it a spin and see what you think!