Add .jshintrc

Per https://www.mediawiki.org/wiki/CC/JS#Linting. Update a few files to
bring the tests closer to passing.

Change-Id: I08b190e8b44dbdbeb56de5c380d0ed4a8394aca2
Merge "Add .jshintrc"