Add AHardwareBuffer_isSupported.

This new function will check whether a buffer with the given description
is allocatable. If the function returns false, buffer allocation will
never succeed. The current implementation performs a trial allocation
of a small buffer, but in the future this will be replaced by a HAL query.

Bug: 115660272
Test: Builds and passes CTS on Pixel 2.

Change-Id: Id0b1573ebf3194b1163324da773279da95782143
4 files changed