make cacherator thread-safe

hoisted from https://codereview.chromium.org/1282363002 as that CL is going to take a while to finish

BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1313423002
2 files changed