Make EqualModules a free function.

Bug: 377723687
Test: Unit tests and compare the ninja and mk files generated.
Change-Id: I7e00f09a15f2857f58bea70bcedc4798630a40bc
diff --git a/android/prebuilt.go b/android/prebuilt.go
index 7273599..4a94c0b 100644
--- a/android/prebuilt.go
+++ b/android/prebuilt.go
@@ -412,7 +412,7 @@
 		if prebuiltMod != nil {
 			return false
 		}
-		if ctx.EqualModules(parent, ctx.Module()) {
+		if EqualModules(parent, ctx.Module()) {
 			// First level: Only recurse if the module is found as a direct dependency.
 			sourceModDepFound = child == module
 			return sourceModDepFound