Add jshint and set all of the quicktests to strict mode.

Fix many improper implicit global vars, and clean up code, and add many semicolons.
Indentation is messed up here if we want to fix it in this commit.