Various jshint fixes:

* Do actual fixes:
** Resolve "Don't make functions within a loop." by hoisting into named function.
** Stray semi-colons
** Whitespace errors
* Add ignore for submodule
* Remove browser (in wrong place) and add QUnit.

Change-Id: I1704d581cb7e5141ac698561cd586f58c680cf2d
Merge "Various jshint fixes:"