add jshint config file, and fix most errors reported by jshint