Check return values from pthread_rwlock_xxlock() functions

Converted pthread_rwlock_xxlock functions with PTHREAD_RWLOCK_xxlock
macros that check the return value. Covers coverity CID# 30226, 30227,
60332, 60333

Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
Reviewed-by: Frank S. Filz <ffilzlnx@mindspring.com>