CodecAsyncHandler: Fix race issue in async mode

Modified await on input/output queues. In earlier design, in a scenario,
async handler thread waits on input/output queues even if the queue is
not empty. This is because of lock-release-relock between isEmpty() and
mCondition.await().

Bug: 149031058
Test:  atest android.mediav2.cts
Change-Id: Iee592e94704c4011d2cd336be5f5fd3a3a03fb78
2 files changed