Refactor for preliminary Rust vendor image support

Refactors parts of CC to prepare for preliminary support for using Rust
static libraries in vendor images. Some previously private functions are
made public, and additional functions are added to LinkableInterface so
GetMakeLinkType can be passed a LinkableInterface.

Bug: 172525289
Test: m
Change-Id: I5fda48e79532fe9ceab255e18d910af58048a123
diff --git a/cc/image.go b/cc/image.go
index 3d6769e..32325b9 100644
--- a/cc/image.go
+++ b/cc/image.go
@@ -41,7 +41,7 @@
 		return hostImageVariant
 	} else if c.inVendor() {
 		return vendorImageVariant
-	} else if c.inProduct() {
+	} else if c.InProduct() {
 		return productImageVariant
 	} else if c.InRamdisk() {
 		return ramdiskImageVariant
@@ -67,7 +67,7 @@
 func (ctx *moduleContext) ProductSpecific() bool {
 	//TODO(b/150902910): Replace HasNonSystemVariants() with HasProductVariant()
 	return ctx.ModuleContext.ProductSpecific() ||
-		(ctx.mod.HasNonSystemVariants() && ctx.mod.inProduct())
+		(ctx.mod.HasNonSystemVariants() && ctx.mod.InProduct())
 }
 
 func (ctx *moduleContext) SocSpecific() bool {
@@ -76,7 +76,7 @@
 }
 
 func (ctx *moduleContextImpl) inProduct() bool {
-	return ctx.mod.inProduct()
+	return ctx.mod.InProduct()
 }
 
 func (ctx *moduleContextImpl) inVendor() bool {
@@ -111,7 +111,7 @@
 }
 
 // Returns true if the module is "product" variant. Usually these modules are installed in /product
-func (c *Module) inProduct() bool {
+func (c *Module) InProduct() bool {
 	return c.Properties.ImageVariationPrefix == ProductVariationPrefix
 }
 
@@ -265,7 +265,7 @@
 		} else {
 			mctx.ModuleErrorf("version is unknown for snapshot prebuilt")
 		}
-	} else if m.HasNonSystemVariants() && !m.isVndkExt() {
+	} else if m.HasNonSystemVariants() && !m.IsVndkExt() {
 		// This will be available to /system unless it is product_specific
 		// which will be handled later.
 		coreVariantNeeded = true