style: fix jshint 'assignment vs expression' issue

Fix for "Expected an assignment or function call and instead saw an expression."
style: add missing semicolons in examples
style: use 'singlequotes' in examples
style: fix 'variable' used out of scope in examples
chore: add 'window' inline global comment
chore: add grunt-complexity as dependency

Add new grunt task `$ grunt complexity`.
The standard setup is tweaked to make the task pass.

Current offending file is:

 * lib/runner/reporters/junit.js (maintainability 98.653)
 * lib/index.js:60 - <anonymous>.setOptions is too complicated
      Cyclomatic: 11
      Halstead: 26.585106382978722
        | Effort: 45620
        | Volume: 1716.0
        | Vocabulary: 64
 * lib/index.js:197 - <anonymous>.printResult is too complicated
      Cyclomatic: 11
      Halstead: 30.183673469387756
        | Effort: 60571
        | Volume: 2006.7
        | Vocabulary: 66
chore: integrate grunt into travis build