ImageReader: Set BufferItem mGraphicBuffer to null when returning it

The ImageReader JNI layer needs to maintain a list of BufferItems that
back the Java Image objects. At start, we allocate maxImages of these
in a list, and acquire and release them from this list as the
application acquires and releases Images.

However, on release, the contents of the BufferItem are not adjusted,
so it can retain a reference to a GraphicBuffer until the BufferItem
is reused.

Test: Camera CTS passes, memory usage drops after camera bursts
Bug: 62652080
Change-Id: I9aade5e32cbe0af0c15a3886e16ada1a70392b74
(cherry picked from commit 0af9435572aa4ef66c61a62605f6eb3f8d218d8b)
diff --git a/media/jni/android_media_ImageReader.cpp b/media/jni/android_media_ImageReader.cpp
index 163c4b0..f408e57 100644
--- a/media/jni/android_media_ImageReader.cpp
+++ b/media/jni/android_media_ImageReader.cpp
@@ -177,6 +177,7 @@
 void JNIImageReaderContext::returnBufferItem(BufferItem* buffer) {
+    buffer->mGraphicBuffer = nullptr;