Refactor factories

Change module factories from returning a blueprint.Module and a list
of property structs to returning an android.Module, which holds the
list of property structs.

Test: build.ninja identical except for Factory: comment lines
Change-Id: Ica1d823f009db812c518f271a386fbff39c9766f
diff --git a/cc/test_data_test.go b/cc/test_data_test.go
index 9b5a85a..a798919 100644
--- a/cc/test_data_test.go
+++ b/cc/test_data_test.go
@@ -131,8 +131,10 @@
 				"dir/baz":        nil,
 				"dir/bar/baz":    nil,
 			})
-			ctx.RegisterModuleType("filegroup", genrule.FileGroupFactory)
-			ctx.RegisterModuleType("test", newTest)
+			ctx.RegisterModuleType("filegroup",
+				android.ModuleFactoryAdaptor(genrule.FileGroupFactory))
+			ctx.RegisterModuleType("test",
+				android.ModuleFactoryAdaptor(newTest))
 
 			_, errs := ctx.ParseBlueprintsFiles("Blueprints")
 			fail(t, errs)
@@ -175,9 +177,11 @@
 	}
 }
 
-func newTest() (blueprint.Module, []interface{}) {
+func newTest() android.Module {
 	m := &testDataTest{}
-	return android.InitAndroidModule(m, &m.Properties)
+	m.AddProperties(&m.Properties)
+	android.InitAndroidModule(m)
+	return m
 }
 
 func (test *testDataTest) DepsMutator(ctx android.BottomUpMutatorContext) {