Add private consumer and producer flags to AHardwareBuffer.

This also generalizes and simplifies the flag conversion,
making it more bulletproof in the future.  To add more flags,
just add new entries into the mapping arrays.

Bug: 34050596
Bug: 35765937
Test: cts-tradefed run cts -m CtsNativeHardwareTestCases
Also added new cc_test libs/nativewindow/tests to test gralloc flag conversion

Change-Id: Ib96b277e837f2ab8c332f14df60e88580e3d868d
6 files changed