add code quality harness

add gulp tasks for eslint:
```
gulp eslint
```
and jsbeautify
```
gulp js-beautify
```

Both are run by `npm test`

Note there are a few `eslint` fixes still to be made around error handling (I fixed the other errors).

How are the tests inside of `/tests` actually run? They should be added to the `npm test` command after the linting:
```
./node_modules/gulp/bin/gulp.js lint && cmd
```

This should also be hooked up to travis.