Use jshint to clean up some easy-to-fix inconsistencies.

Clean up missing semicolons, use ===, remove trailing whitespace, remove unused variables, clean up
globals.