libui: Add Gralloc1On0Adapter and C++ shim

Adds an adapter which provides the gralloc1 interface on top of a
gralloc 0.x device as well as a C++ shim which wraps a gralloc1 device
and provides a somewhat nicer interface to the rest of the system.

This has also been squashed with a later commit that added mutexes to
protect both the buffer list and the descriptor list from concurrent
access.

Bug: 28401203
Bug: 29420918
Change-Id: I0eeafc998b56e2e2fc39de6fad41e3ed2e19658a
5 files changed