Switch to Mocha test framework

Switch unit tests to [mocha](http://visionmedia.github.io/mocha/) test framework.

Now we're using mocha we can probably port some of the simpler browser tests to use supertest instead to get a bit of a speed boost, but I'll open a separate ticket for that.

Fixes #350