Refactor some more tests to use HomeserverTestCase.