Rework vndk detection

Instead of having a module define `use_vndk: true`, assume that we're
building with the VNDK if we're installed on the vendor partition, and
BOARD_VNDK_VERSION==current. This now matches our behavior in Make.

Once BOARD_VNDK_VERSION!=current, we'll need to disable modules that
need to otherwise compile against the VNDK, since we can only compile
against the current VNDK.

Test: build.ninja for aosp_arm is the same before/after
Test: Ensure there are no boards that set BOARD_VNDK_VERSION
Change-Id: If937fa7bdb119648137af52daebadf486163484b
diff --git a/android/module.go b/android/module.go
index cc420fb..8228a9c 100644
--- a/android/module.go
+++ b/android/module.go
@@ -59,6 +59,7 @@
 	Darwin() bool
 	Debug() bool
 	PrimaryArch() bool
+	Proprietary() bool
 	AConfig() Config
 	DeviceConfig() DeviceConfig
 }
@@ -87,7 +88,6 @@
 
 	AddMissingDependencies(deps []string)
 
-	Proprietary() bool
 	InstallInData() bool
 
 	RequiredModuleNames() []string
@@ -455,6 +455,7 @@
 	return androidBaseContextImpl{
 		target:        a.commonProperties.CompileTarget,
 		targetPrimary: a.commonProperties.CompilePrimary,
+		proprietary:   a.commonProperties.Proprietary,
 		config:        ctx.Config().(Config),
 	}
 }
@@ -491,6 +492,7 @@
 	target        Target
 	targetPrimary bool
 	debug         bool
+	proprietary   bool
 	config        Config
 }
 
@@ -619,8 +621,8 @@
 	return DeviceConfig{a.config.deviceConfig}
 }
 
-func (a *androidModuleContext) Proprietary() bool {
-	return a.module.base().commonProperties.Proprietary
+func (a *androidBaseContextImpl) Proprietary() bool {
+	return a.proprietary
 }
 
 func (a *androidModuleContext) InstallInData() bool {