Switch to test helpers instead of TestCase classes

This is the bulk of the test cleanup work. There are still a few things that could use improving, but we can probably do those incrementally during other work.