Convert findImplementationLibrary and compilerFlags to use ModuleProxy.

Bug: 377723687
Test: Unit tests and compare the ninja and mk files generated.
Change-Id: If1f4a1bf81737c49046cd268a34110a0e38bb2f5
diff --git a/cc/compiler.go b/cc/compiler.go
index 91f107c..f2bced1 100644
--- a/cc/compiler.go
+++ b/cc/compiler.go
@@ -367,7 +367,7 @@
 	modulePath := ctx.ModuleDir()
 
 	reuseObjs := false
-	if len(ctx.GetDirectDepsWithTag(reuseObjTag)) > 0 {
+	if len(ctx.GetDirectDepsProxyWithTag(reuseObjTag)) > 0 {
 		reuseObjs = true
 	}