Fix tests not using ModuleStoreTestCase

Some tests test were using `CourseFactory` buy not deriving from
`ModuleStoreTestCase`, introducing a course leaks that broke other
unrelated tests.