[pthread sem]qcamera semaphore implementation

Implement semaphore with mutex and conditional variable.
Reason being, POSIX semaphore on Android are not used or well tested.