clean and lint tests, enable jshint on tests

Ran fixjsstlye on all the tests, fixed any outstanding errors, and
enabled jshint for checking tests in continuous integration.
Merge pull request #2762 from mbroadst/lint-tests

clean and lint tests, enable jshint on tests
make UniqueConstraintError inherit ValidationError

Unique constraint errors are in fact a different type of validation
error, run on the database level. While important to make a destinction
internally when we have encountered a UniqueConstraintError vs a normal
ValidationError, on the user side they should be represented the same.
This patch allows these exceptions to provide data in the same fashion
making it easier to uniformly process the errors