Move redundant boilerplate from tests to a common parent class

This includes all tests except for AnalyzedPHPFileTest, BaseScannerTest,
and VIPInitCheckTest, which are a bit more complex. Also, JavaScriptLintTest
and VIPParametersTest could use some more optimization, possibly requiring
some extra parameters or logic in CheckTestBase::runCheck().