example: add jshint and fix style violations

Include .jshint* files in the generated example app, add `npm pretest`
script to run jshint.

Fix style violations in the `rest-api.test.js` template.

/cc @ritch FYI