Fixed karma:unit task

* Karma 0.9.6 got rid of the `runnerPort` property. Removing the
reference to that in the Karma config file and renaming the
`karma:unit:run` task to `karma:unit` allowed Karma to launch a server
on the port specified in the `port` property.
* Added `document` to JSHint global in main.js. This will probably get
moved to the JSHint config globals list.
* JSHint was giving a “Bad line breaking before '||’” error on line
111. Moving the `or` operator to the end of the previous line resolved
the error.
* Added a `test` task to Grunt which lints `main.js` and runs the unit
tests against it.