Run jshint as a unittest; fix a bunch of jshint complaints

This copies over the auto-jshint test defns from picl-tabs, and fixes any existing jshint complaints.  @zaach r?