Use our own mutex abstraction

Change-Id: I12faa0016977e1d5b08cdd05f509aebf71a5bbb8
Reviewed-on: http://review.couchbase.org/30014
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Tested-by: Chiyoung Seo <chiyoung@couchbase.com>
Use our own condition variable impl

Change-Id: Iad2ce85335fa9d5737fc39282e7429e6bb94c441
Reviewed-on: http://review.couchbase.org/30015
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Tested-by: Chiyoung Seo <chiyoung@couchbase.com>