Camera2: Implement semaphore with mutex and condition.

POSIX semaphore is not used or well tested on Android.
Implement it using mutex and conditional variable instead.

Change-Id: I480aa69a682821674aa95ff58f40a3b90a8714bc
17 files changed