Fix variable definition errors found by jshint

This includes an update to the test runners, which now use a separate jshint config with expanded globals for tests.

@mwhite 
This is an unused function, which triggers an error in jshint causing the test runner to fail. It seems like it might have some value, so keeping it around until I can either use it or figure out that it does not have enough value to keep it here.