Add a temp impl of pthread's rwlocks.

This borrows from https://github.com/macton/nativecolors/blob/master/host/src/libraries/nativeyellow/pthread_rwlock.c,
with additional functions written by yours truly.
This commit will be reverted once https://codereview.chromium.org/623863002/ makes it into pepper stable.