Clear transaction that's passed to mergeWithNextTransaction

The std::move wasn't actually clearing the incoming transaction so it
was possible for the transaction to get applied by something else. This
would cause unexpected behavior since the caller intented for the
transaction to be merged with the next frame.

Instead, just explicitly clear the transaction after storing in the
vector.

Test: No longer flickers when resizing pip
Fixes: 182985130
Change-Id: Ie6ed0825074fb51ae3c260832002c012606241a1
diff --git a/libs/gui/BLASTBufferQueue.cpp b/libs/gui/BLASTBufferQueue.cpp
index f778232..ab75d03 100644
--- a/libs/gui/BLASTBufferQueue.cpp
+++ b/libs/gui/BLASTBufferQueue.cpp
@@ -608,7 +608,9 @@
         // Apply the transaction since we have already acquired the desired frame.
         t->apply();
     } else {
-        mPendingTransactions.emplace_back(frameNumber, std::move(*t));
+        mPendingTransactions.emplace_back(frameNumber, *t);
+        // Clear the transaction so it can't be applied elsewhere.
+        t->clear();
     }
 }