gralloc: Refactor gralloc4.0 for some concerns in code review

There were some concerns raised in the intern code review process. Since
Qualcomm has merged their Gralloc4.0 changes into their codebase, the
patch created another standlane change to address the concerns within
the code review.

Bug: 141596968
Test: VtsHalGraphicsMapperV4_0TargetTest
Change-Id: I33905f5f1198089a1e3fe16e1fd46a8f614e8679
(cherry picked from commit 3dfff2a5af39b14422ede072e3e9d95596e5fc3f)
4 files changed