Reimplement AddMissingDependencies

AddMissingDependencies is needed in BaseModuleContext in order
to allow PathsForModuleSrc and friends to be called in mutators,
It's not a simple move, as it currently writes to a module
field that would be lost if any mutators cloned new variants
by calling CreateVariations.  Reimplement it using a mutated
property instead.

Test: m checkbuild
Change-Id: I851125065e4c5302b552773dae4640426c62965e
diff --git a/android/paths_test.go b/android/paths_test.go
index 78cfbbe..e0c2f6c 100644
--- a/android/paths_test.go
+++ b/android/paths_test.go
@@ -758,6 +758,11 @@
 	if !p.props.Module_handles_missing_deps {
 		p.missingDeps = ctx.GetMissingDependencies()
 	}
+
+	ctx.Build(pctx, BuildParams{
+		Rule:   Touch,
+		Output: PathForModuleOut(ctx, "output"),
+	})
 }
 
 type pathForModuleSrcOutputFileProviderModule struct {