Move stubs related methods out of LinkableInterface

The stubs methods are very specific to cc for now, move them out
of LinkableInterface so they are not shared with rust.  Instead,
create a cc.Module.library field that contains the libraryInterface
to simplify calling libraryInterface methods on cc modules.

Test: all Soong tests
Test: no change to Soong outputs
Change-Id: I0289d866ce1f7a765631fe3101a62b1b4988ba1c
diff --git a/cc/vndk.go b/cc/vndk.go
index 7d8777c..b2614c5 100644
--- a/cc/vndk.go
+++ b/cc/vndk.go
@@ -313,7 +313,7 @@
 		panic(err)
 	}
 
-	if m.HasStubsVariants() && name != "libz" {
+	if lib := m.library; lib != nil && lib.hasStubsVariants() && name != "libz" {
 		// b/155456180 libz is the ONLY exception here. We don't want to make
 		// libz an LLNDK library because we in general can't guarantee that
 		// libz will behave consistently especially about the compression.