Update JSHint options and lint code

Update the JSHint options to be as compliant as possible with the
sonar javascript rules -http://sonar.craftercms.org/rules_configuration/index/6