make check: Run jshint static analyzer

The available choices seem to be either jshint or jslint, and jshint
seems to be more configurable.

Run `npm install` to install jshint.

The various configuration options are documented at
http://jshint.com/docs/options/ -- I just picked ones that seemed
useful. The most important one is `undef` to catch typos in variable
names. One day maybe I'll also enable `unused`. `browser`, `devel`,
`jquery`, and `predef` are all to teach jshint about globals like
`console`, jquery's `$`, and other libraries that we use.

The `sed` in the makefile is to make jshint's output match the format of
gcc errors, `grep -n`, etc., so that my editor can navigate to the
location of each error.

The changes to app.js are to comply with jshint: Adding missing
semicolons or removing unnecessary ones, using `!==` instead of `!=`
(the latter does implicit typecasting), and wrapping overly long lines.