Camera2: Fix deadlock on shutdown due to client getting killed.
When the binder connection dies and is the only holder of a strong
pointer to the Camera2Client, disconnect is called from the
destructor. At this point, all weak pointers to Camera2Client are no
longer promotable, and lots of cleanup code paths are broken as a
result.
Rework all such code paths to not need the client pointer, and to
discard image buffers that arrive during shutdown.
Bug:
8696047
Change-Id: Ic0672ecde7c1baaf65079f925a45bd5be45f1fb3