Fixed JSHint errors so that it can be turned on in Travis

By changing the `.jshintrc` setting for `unused` to be `"vars"`, we can ignore the case where we have an unused parameter. This means we can have linting as part of our tests without having to remove the parameters from unimplemented functions.

Then fixed the few genuine errors and made it so that Travis will do the linting.