De-lint JavaScript sources.

Fix various minor lint and codestyle issues with the JavaScript sources,
so that jenkins test runners can accurately catch new violations.

Note that by convention 'null' is used for "empty" values which are
explicitly assigned/initialized, which allows us to use the
'undefined' value to more accurately identify errors in which
uninitialized fields/variables are used.

Change-Id: I5d5d4634d7450b006120a71c5a9dc9e3193b4e90