add jshint checking, fix some jshint errs

JSHint is a lint tool for javascript, Travis will now check your javascript for common errors before validating the build.

@mstorus, @yskhoo please review