JSHint Fixes

This is a pretty straight-forward: it simply adds .jshintrc configurations for `/javascript/`  and `/spec/` so that those of us using editors with jshint build in don't get loads of warnings about semi-colons etc.  

In addition, I've gone through the warnings and removed some duplicate `var` definitions, unused variables, and other really minor problems. 

Even if you choose not to include the .jshintrc configs, dropping the unused variables and duplicate vars may still be a good idea.