lib: rename wrappers of pthread_rwlock

Current lib/util.h wraps stuff related to pthread_rwlock with the
prefix like "sd_lock".

It is confusing because we also need to wrap pthread_mutex. This patch
changes the convention from sd_lock to sd_rw_lock.

Renamed stuff list:
- struct sd_lock -> struct sd_rw_lock
- sd_init_lock() -> sd_init_rw_lock()
- sd_destroy_lock() -> sd_destroy_rw_lock()
- sd_unlock() -> sd_rw_unlock()

Signed-off-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>
lib: introduce new wrappers for pthread_mutex and pthread_cond

There is a possibility that pthread_mutex_* functions can return
undocumented error code, we need to wrap them. This patch introduces
wrapper functions and a new data structure for them.

In addition, pthread_cond_* things should also be wrapped. Because we
don't use pthread_mutex_t directly any more, we cannot use
pthread_cond_wait(). This patch also adds wrappers for them.

Signed-off-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
[ fixed compile error - Yuan ]
Signed-off-by: Liu Yuan <namei.unix@gmail.com>