Implement shared locks in the style of pthread's rwlock.

BUG=skia:

Review URL: https://codereview.chromium.org/1215503005
4 files changed