Read-write locking in Objective-C. Wrapper around pthread's rwlock.