libgui: New mutex for ConsumerBase frame callbacks

Adds a new mutex to protect ConsumerBase's mFrameAvailableListener
separately from the main mMutex. This prevents deadlocks when trying
to perform callbacks in response to other calls that come through
ConsumerBase.

Bug: 62915791
Test: EncodeVirtualDisplayWithCompositionTest#
          testRenderingMaxResolutionRemotely

Change-Id: I244dc2d83488e452d9690c0d7847c9ff15a95dbb
(cherry picked from commit 95971c8172495f7b6a0ede1a3508472b9a4e7b36)
3 files changed