gralloc: move codec2 to GraphicBufferAllocator/Mapper

libui's GraphicBufferAllocator/Mapper already wrap the different
gralloc functions and hide the details from the caller. There is no
reason C2AllocatorGralloc needs to directly talk to gralloc.
This patch updates C2AllocatorGralloc to use libui.

Bug: 145139476
Test: Cherry pick ag/9741096 and run
    android.media.cts.MediaMetadataRetrieverTest#testThumbnailVP9Hdr

Change-Id: I41e106ea8faad02b1eb4d20557dda3ecb1aeedec
diff --git a/media/codec2/vndk/Android.bp b/media/codec2/vndk/Android.bp
index e0b3939..071bb74 100644
--- a/media/codec2/vndk/Android.bp
+++ b/media/codec2/vndk/Android.bp
@@ -50,13 +50,8 @@
     ],
 
     shared_libs: [
-        "android.hardware.graphics.allocator@2.0",
-        "android.hardware.graphics.allocator@3.0",
-        "android.hardware.graphics.allocator@4.0",
         "android.hardware.graphics.bufferqueue@2.0",
-        "android.hardware.graphics.mapper@2.0",
-        "android.hardware.graphics.mapper@3.0",
-        "android.hardware.graphics.mapper@4.0",
+        "android.hardware.graphics.common@1.2",
         "android.hardware.media.bufferpool@2.0",
         "libbase",
         "libcutils",