DO NOT MERGE libgui: Prepare for IGBC::BufferItem removal

Currently, there are two instances of BufferItem: one inside of
IGraphicBufferConsumer, and a standalone one inside of libgui. They
only differ in the name of one of the fields, and we want to remove
the IGBC version. This changes things so that client code may be
incrementally switched over to the libgui version.

This is a squashed commit containing the following changes:
    I64f495105f56cbf5803cea4aa6b072ea29b70cf5
    I1394e693314429ada93427889f10b7b01c948053
    I9c3bc8037fa9438d4d9080b8afb694219ef2f71f
    I699ed0a6837076867ca756b28d1ffb2238f7a0d9
    Iac8425e1241774304a131da2fb9dec6e82922f13

Change-Id: Ic4d51f5df6dbc70b376d13fceba2335b9bae4f3d
diff --git a/include/gui/BufferItem.h b/include/gui/BufferItem.h
index c7a8bc9..112c482 100644
--- a/include/gui/BufferItem.h
+++ b/include/gui/BufferItem.h
@@ -44,6 +44,7 @@
     // The default value of mBuf, used to indicate this doesn't correspond to a slot.
     enum { INVALID_BUFFER_SLOT = -1 };
     BufferItem();
+    BufferItem(const IGraphicBufferConsumer::BufferItem& item);
     ~BufferItem();
     operator IGraphicBufferConsumer::BufferItem() const;
 
@@ -86,8 +87,13 @@
     // mFrameNumber is the number of the queued frame for this slot.
     uint64_t mFrameNumber;
 
-    // mSlot is the slot index of this buffer (default INVALID_BUFFER_SLOT).
-    int mSlot;
+    union {
+        // mSlot is the slot index of this buffer (default INVALID_BUFFER_SLOT).
+        int mSlot;
+
+        // mBuf is the former name for mSlot
+        int mBuf;
+    };
 
     // mIsDroppable whether this buffer was queued with the
     // property that it can be replaced by a new buffer for the purpose of