Define Soong phony rules in Make

To support dist-for-goals in Soong, we need to define all phony rules
in Make so that dist-for-goals can insert additional dependencies on
them.  Collect all the phony rules in phonySingleton and write them
out as Make rules when Soong is embedded in Make, or as blueprint.Phony
rules when Soong is run standalone.

Bug: 153485543
Test: m checkbuild
Change-Id: I68201eff30744b0f487fc4f11f033767b53a627d
Merged-In: I68201eff30744b0f487fc4f11f033767b53a627d
(cherry picked from commit c3d87d31129405975f9a889e3c1c96cdcbe275a4)
diff --git a/java/java.go b/java/java.go
index b086504..f563a38 100644
--- a/java/java.go
+++ b/java/java.go
@@ -2852,11 +2852,7 @@
 	})
 	// TODO(asmundak): perhaps emit a rule to output a warning if there were no xrefTargets
 	if len(xrefTargets) > 0 {
-		ctx.Build(pctx, android.BuildParams{
-			Rule:   blueprint.Phony,
-			Output: android.PathForPhony(ctx, "xref_java"),
-			Inputs: xrefTargets,
-		})
+		ctx.Phony("xref_java", xrefTargets...)
 	}
 }