Make .jshintrc more strict

When I originally added this file to the project, I simply copied
another project's settings. This commit removes most of the relaxing
options and adds most of the enforcing options. If we had these lints
enabled, we would have avoided the previous bug. Descriptions of these
options can be found at:

  http://www.jshint.com/docs/options/

At the same time I made some adjustments to the code to satisfy the new
lints.

Change-Id: I1b83b8c439812bac843f1705f9bff3d54e5fdfc0
Reviewed-on: http://gerrit.causes.com/37022
Tested-by: Joe Lencioni <joe.lencioni@causes.com>
Reviewed-by: Hao Su <hao.su@causes.com>
Release v1.0.3

Change-Id: I5cf675832f4072972389d6e7ddc5e5691d82a6e7
Reviewed-on: http://gerrit.causes.com/37017
Tested-by: Joe Lencioni <joe.lencioni@causes.com>
Reviewed-by: Hao Su <hao.su@causes.com>