Make TestContext.RegisterModuleType take an android.ModuleFactory

Avoid having to pass ModuleFactoryAdaptor to every call to
RegisterModuleType in a test by wrapping RegisterModuleType.

Test: all soong tests
Change-Id: If8847d16487de0479cc3020b728256922b3cadba
diff --git a/cc/genrule_test.go b/cc/genrule_test.go
index 92024ac..785e3e1 100644
--- a/cc/genrule_test.go
+++ b/cc/genrule_test.go
@@ -25,7 +25,7 @@
 	fs map[string][]byte) *android.TestContext {
 
 	ctx := android.NewTestArchContext()
-	ctx.RegisterModuleType("cc_genrule", android.ModuleFactoryAdaptor(genRuleFactory))
+	ctx.RegisterModuleType("cc_genrule", genRuleFactory)
 	ctx.Register()
 
 	mockFS := map[string][]byte{