Add Karma coverage

Also update source to better reflect inheritance in documentation.
There's a neat trick in CoffeeScript:
which exports the class in one line. But it confuses Codo so needed
to revert back to the  syntax. Not DRY, but OK
for now.

Additionally ignoring doc and test/coverage directory until I can figure
out if it would be better to check it in or if it should only be included
with builds.