Extract the spinlock from SkOnce as SkSpinlock.

This uses slightly newer APIs from SkAtomics.h to make it a bit more efficient.

No public API changes.
TBR=reed@google.com

BUG=skia:

Review URL: https://codereview.chromium.org/1039323002
6 files changed