Validate jshintrc and add Travis CI support.

Moved all jshint options to the .jshintrc file.

This way editors with jshint-plugins pick it up, and we can also
use node-jshint on the command line to lint all files at once.

I ran it once locally to make sure it passes and fixed the
errors it gave:
* Single quotes
* Various unused variables
* Undefined variable (console.log -> window.console.log ).
  Condition used different identifier than actual code.

Adding a configuration file for Travis CI. This will:
* automatically install the repo in a VM server at Travis, run
  the tests and update the badge in the README – on every commit.
* listen for pull requests and run tests for that as well (saves
  you from having to leave comments like "use single quotes" or
  "syntax error!")