Make some pthread_mutex_* and pthread_cond_* interceptors common.

Reviewers: eugenis, dvyukov

Reviewed By: dvyukov

CC: llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D1937