Wait for buffer allocation

In dequeueBuffer, if we don't have a free slot but are in the
process of allocating, we wait for that to complete instead of
kicking off our own allocation, as it's likely that the allocation
from allocateBuffers is able to finish earlier than if we'd kick
off our own allocation.

Test: Swipe up, see less initial buffer dequeue delay
Fixes: 111517695
Change-Id: I735d68e87fc7e2ff5b7ec3595f0ced5a94ebbf9c
2 files changed