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/genrule/genrule.go b/genrule/genrule.go
index dc4e968..c5de1fd 100644
--- a/genrule/genrule.go
+++ b/genrule/genrule.go
@@ -268,17 +268,20 @@
 	}
 }
 
-func generatorFactory(tasks taskFunc, props ...interface{}) (blueprint.Module, []interface{}) {
+func generatorFactory(tasks taskFunc, props ...interface{}) android.Module {
 	module := &generator{
 		tasks: tasks,
 	}
 
-	props = append(props, &module.properties)
+	module.AddProperties(props...)
+	module.AddProperties(&module.properties)
 
-	return android.InitAndroidModule(module, props...)
+	android.InitAndroidModule(module)
+
+	return module
 }
 
-func GenSrcsFactory() (blueprint.Module, []interface{}) {
+func GenSrcsFactory() android.Module {
 	properties := &genSrcsProperties{}
 
 	tasks := func(ctx android.ModuleContext, srcFiles android.Paths) []generateTask {
@@ -300,7 +303,7 @@
 	Output_extension string
 }
 
-func GenRuleFactory() (blueprint.Module, []interface{}) {
+func GenRuleFactory() android.Module {
 	properties := &genRuleProperties{}
 
 	tasks := func(ctx android.ModuleContext, srcFiles android.Paths) []generateTask {