add jshint to `make test`

* add a lint target to the Makefile that runs jshint
* fix all jshint errors from the default config
* have the make test target run the lint target
Updates should be made as a separate PR, unless absolutely required for a specific feature. It is hard to tell why something started to fail otherwise.