JSHint fixes

- Fixed JSHint warning with Promise.
- Added JSHint validation to all project files using gulp and gulp-jshint
- Fixed some minor problems that jshint warnings made obvious.
- Added strict mode to avoid not so obvious errors.
- Added JSHint validation to CI / npm test