All consumers now take an IGraphicBufferConsumer instead of a BufferQueue

this means they only have access to the consumer end of
the interface. we had a lot of code that assumed consumers
where holding a BufferQueue (i.e.: both ends), so most of
this change is untangling in fix that

Bug: 9265647
Change-Id: Ic2e2596ee14c7535f51bf26d9a897a0fc036d22c
diff --git a/libs/gui/SurfaceComposerClient.cpp b/libs/gui/SurfaceComposerClient.cpp
index bad4138..048553c 100644
--- a/libs/gui/SurfaceComposerClient.cpp
+++ b/libs/gui/SurfaceComposerClient.cpp
@@ -633,8 +633,8 @@
 
 sp<CpuConsumer> ScreenshotClient::getCpuConsumer() const {
     if (mCpuConsumer == NULL) {
-        sp<BufferQueue> bq = new BufferQueue();
-        mCpuConsumer = new CpuConsumer(bq, 1);
+        mBufferQueue = new BufferQueue();
+        mCpuConsumer = new CpuConsumer(mBufferQueue, 1);
         mCpuConsumer->setName(String8("ScreenshotClient"));
     }
     return mCpuConsumer;
@@ -653,7 +653,7 @@
         mHaveBuffer = false;
     }
 
-    status_t err = s->captureScreen(display, cpuConsumer->getBufferQueue(),
+    status_t err = s->captureScreen(display, mBufferQueue,
             reqWidth, reqHeight, minLayerZ, maxLayerZ, true);
 
     if (err == NO_ERROR) {