Port uses-shared library verification and dexpreopting to Soong

Ports 09f3b97f4b488cd3a7b7d72038b173575b02c162 (Add support for
preopt with uses-libraries) from Make to Soong to support verifying
and preopting shared libraries.

This reapplies Id25f55f07a55120bebe2a9b32c094209efc85c8b with fixes
for unbundled builds and builds with ALLOW_MISSING_DEPENDENCIES=true
set.

Bug: 132357300
Test: app_test.go
Test: m checkbuild
Change-Id: I964309a68ec4ed081f3f3154879c71048ecb5455
diff --git a/dexpreopt/config.go b/dexpreopt/config.go
index e11e33a..5a1bd74 100644
--- a/dexpreopt/config.go
+++ b/dexpreopt/config.go
@@ -65,8 +65,6 @@
 	AlwaysOtherDebugInfo        bool // always generate mini debug info for non-system server modules (overrides NoDebugInfo=true)
 	NeverOtherDebugInfo         bool // never generate mini debug info for non-system server modules (overrides NoDebugInfo=true)
 
-	MissingUsesLibraries []string // libraries that may be listed in OptionalUsesLibraries but will not be installed by the product
-
 	IsEng        bool // build is a eng variant
 	SanitizeLite bool // build is the second phase of a SANITIZE_LITE build
 
@@ -118,10 +116,10 @@
 	ProfileClassListing  android.OptionalPath
 	ProfileIsTextListing bool
 
-	EnforceUsesLibraries  bool
-	OptionalUsesLibraries []string
-	UsesLibraries         []string
-	LibraryPaths          map[string]android.Path
+	EnforceUsesLibraries         bool
+	PresentOptionalUsesLibraries []string
+	UsesLibraries                []string
+	LibraryPaths                 map[string]android.Path
 
 	Archs           []android.ArchType
 	DexPreoptImages []android.Path
@@ -310,7 +308,6 @@
 		NeverSystemServerDebugInfo:         false,
 		AlwaysOtherDebugInfo:               false,
 		NeverOtherDebugInfo:                false,
-		MissingUsesLibraries:               nil,
 		IsEng:                              false,
 		SanitizeLite:                       false,
 		DefaultAppImages:                   false,