pthread: implement reader/writer lock
Add pthread_rwlock test
Merge pull request #1018 from Kijewski/pthread-rwlock

pthread: implement reader/writer lock