Enforce project's code style with linting rules

These directives match the recommendations made by this project's style
guide.
Remove references to unused variables

...and prevent future errors with a linting rule.
Use linting to guard against undefined variables

This requires splitting the linting rules according to environment.
Lint test files

Temporarily relax rules for test environment (these errors to be fixed
in a separate commit)
Add stricter linting rules for test files

...and update test source code to pass.
Merge pull request #357 from jugglinmike/lint

Make linting rules more strict