Refine test environment and track test coverage.

Karma now tests the built code and generates code coverage reports.

![screen shot 2014-04-29 at 01 34 44](https://cloud.githubusercontent.com/assets/908178/2824244/c269b366-cf2d-11e3-8a5b-36c151d18da6.png)

I'd love to set up [coveralls](https://coveralls.io/), but I'd need push access to set the required env variables for Travis.

I removed an incorrect test, so we should now at least be back to green.

The `grunt dev` task isn't working correctly atm, because karma keeps telling me `Waiting for previous execution...`. I suspect there is a hanging test so the testing session isn't closed down. But maybe I'm missing something obvious there, dunno. I'll investigate some more.