Consolidate to only use AndroidXExtension.type to control publishing

Removing all uses of AndroidXExtension.publish replacing it with appropriate AndroidXExtension.type within build.gradle files

Also refactor LibraryTypes by a single class `ConfigurableLibray` to make it simpler to add new types, reducing code dups

BUG: 327630926
TESTED: Ran ./gradlew bOS --dry-run and it was the same as HEAD

Change-Id: I0f65a086a1c47e537864ce1fdca8975cbb2da581
diff --git a/external/libyuv/build.gradle b/external/libyuv/build.gradle
index 45640f2..9f91b2a 100644
--- a/external/libyuv/build.gradle
+++ b/external/libyuv/build.gradle
@@ -22,7 +22,6 @@
  * modifying its settings.
  */
 import androidx.build.LibraryType
-import androidx.build.Publish
 
 apply plugin: 'AndroidXPlugin'
 apply plugin: 'com.android.library'
@@ -69,7 +68,7 @@
 androidx {
     name = "libyuv"
     // Only intended to be used as snapshots, do not change to PUBLISHED.
-    publish = Publish.SNAPSHOT_ONLY
+    type = LibraryType.SNAPSHOT_ONLY_LIBRARY
     inceptionYear = "2021"
     description = "libyuv is an open source project that includes YUV scaling and conversion functionality."
 }