Clean up IBGP usage in BufferQueue based BlockPool

Handle remote error of IGBP#cancel. Also do not use nullptr fence for
IGBP#cancel.

Bug:123259906
Change-Id: Id5a621165726e327db23be23234a23e8fed7c095
(cherry picked from commit e7306ad9eabe4699364cac94599dfde61617ab87)
diff --git a/codec2/vndk/platform/C2BqBuffer.cpp b/codec2/vndk/platform/C2BqBuffer.cpp
index 2ea4abe..42f0fbc 100644
--- a/codec2/vndk/platform/C2BqBuffer.cpp
+++ b/codec2/vndk/platform/C2BqBuffer.cpp
@@ -206,7 +206,6 @@
                 });
         // dequeueBuffer returns flag.
         if (!transStatus.isOk() || status < android::OK) {
-            ALOGD("cannot dequeue buffer %d", status);
             if (transStatus.isOk()) {
                 if (status == android::INVALID_OPERATION ||
                     status == android::TIMED_OUT ||
@@ -214,6 +213,7 @@
                     return C2_TIMED_OUT;
                 }
             }
+            ALOGD("cannot dequeue buffer %d", status);
             return C2_BAD_VALUE;
         }
         ALOGV("dequeued a buffer successfully");
@@ -412,7 +412,7 @@
     void cancel(uint64_t igbp_id, int32_t igbp_slot) {
         std::lock_guard<std::mutex> lock(mMutex);
         if (igbp_id == mProducerId && mProducer) {
-            (void)mProducer->cancelBuffer(igbp_slot, nullptr).isOk();
+            (void)mProducer->cancelBuffer(igbp_slot, hidl_handle{}).isOk();
         }
     }
 
@@ -453,7 +453,7 @@
     if (local && localPool) {
         localPool->cancel(bqId, bqSlot);
     } else if (igbp) {
-        igbp->cancelBuffer(bqSlot, nullptr);
+        (void)igbp->cancelBuffer(bqSlot, hidl_handle{}).isOk();
     }
 }