add jshint; use local mocha and jshint
fix jshint errors
slightly more strict jshint rules
[style] fix variable scope definition for new jshint rules