Fix prebuilt library stubs

There were multiple stacked issues with prebuilt library stubs that
cancelled eachother out.  Prebuilts were never considered to be
DirectlyInAnyApex by the AndroidMk logic to handle stubs libraries
because it looked it up in the global list of modules in apexes
using the name with the "prebuilt_" prefix.  Fixing that to use
ctx.BaseModuleName() exposed a second issue, that stubs variants
for prebuilt libraries were never created, so there was no latest
version to expose to Make.

Making the *prebuiltLibraryLinker type work with all of the
methods that handle stubs should really be done with an interface
and methods implemented on *libraryDecorator, but that would
also cause other types like that embed libraryDecorator to
participate in stubs that may trigger more issues.  I'd like
to replace those methods anyways, so just manually handle
*prebuiltLibraryLinker for now.

Test: m checkbuild
Change-Id: I1267ee01659ad9ab11d75318c6c6bdbf8f72a061
diff --git a/cc/androidmk.go b/cc/androidmk.go
index 4f149af..d92fabc 100644
--- a/cc/androidmk.go
+++ b/cc/androidmk.go
@@ -33,7 +33,7 @@
 )
 
 type AndroidMkContext interface {
-	Name() string
+	BaseModuleName() string
 	Target() android.Target
 	subAndroidMk(*android.AndroidMkEntries, interface{})
 	Arch() android.Arch
@@ -278,7 +278,7 @@
 		})
 	}
 	if len(library.Properties.Stubs.Versions) > 0 &&
-		android.DirectlyInAnyApex(ctx, ctx.Name()) && !ctx.InRamdisk() && !ctx.InRecovery() && !ctx.UseVndk() &&
+		android.DirectlyInAnyApex(ctx, ctx.BaseModuleName()) && !ctx.InRamdisk() && !ctx.InRecovery() && !ctx.UseVndk() &&
 		!ctx.static() {
 		if library.buildStubs() && library.isLatestStubVersion() {
 			// reference the latest version via its name without suffix when it is provided by apex