Make linting rules more strict

As discussed in issue #354, more of the project's style recommendations can be programatically enforced. Since we're already using JSHint, I've just updated the directives that we pass there. I've also put the unit test code under linting, which accounts for the majority of the changes you see here.