add missing semicolons, fix other small issues

* add missing semicolons
* move function creation out of loops
* cleanup some indentation issues
remove unecessary 'undefined' declarations
Replace JS 1.8 code with more broadly compliant idioms

replaces `for each ... in ...` with the more widely supported
`for ... in ...` iterator. Also adds some brackets to disambiguate
some shorthand `if` and `for` one liners as blocks. Miscellanious
other one-off linter violations, typos, or dead code removals
Beautify dashboard.js, remove JS 1.8

This commit runs dashboard.js through the uglify beautifier and
removes the script type directing the browser to load the code as
JS 1.8 now that it's rewritten in a more broadly compliant JS
Merge pull request #8 from lonnen/migrate-off-js-1.8

Migrate off JS 1.8