Revert^2 "Convert cc modules to use AndroidMkInfoProvider."

This reverts commit 37e6794ad44926e64c1f733dbe32bbf5a40efe77.

Reason for revert: reland with fix to the test

Bug: 358427516
Test: Unit tests and manually compare generated mk files.
Change-Id: Iddc34471f15cfe0c8ed863d05a1344e295925565
diff --git a/cc/library_headers_test.go b/cc/library_headers_test.go
index 1924b2f..5a45767 100644
--- a/cc/library_headers_test.go
+++ b/cc/library_headers_test.go
@@ -46,7 +46,7 @@
 
 			// Test that there's a valid AndroidMk entry.
 			headers := ctx.ModuleForTests("headers", "android_arm64_armv8-a").Module()
-			e := android.AndroidMkEntriesForTest(t, ctx, headers)[0]
+			e := android.AndroidMkInfoForTest(t, ctx, headers).PrimaryInfo
 
 			// This duplicates the tests done in AndroidMkEntries.write. It would be
 			// better to test its output, but there are no test functions that capture that.