Fix bug 1055078 - Update JS files to pass JSHint

Checking our JS changes with JSHint will be important so that all front-end work is uniform.

There's one exception in JSHint tests which is in wiki-edit.js, and that is using ".error".  I don't feel comfortable using that key in that way, I think "array" syntax is better there.