Convert futex to cond wait.

Switch to the better supported pthread_cond to handle the Wait/Wake
functions.

Also, increase the number of simultaneous threads in the thread tests.

Bug: 18381207

(cherry picked from commit db44538387b08f367fc2419653639866f4c2fbd6)

Change-Id: Id326a7a7b92cb61573def3f761597c40f3ef2f4b
4 files changed