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: Ie687557089064a6d02c7505f2024db6a23e003c8
(cherry picked from commit ce25d55c476a20e6cc130d3ba9500cd055b63392)
6 files changed