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
So `make` can own the actual test script, and we can manage it easier as multi-line script.