Use shared lock for charsToGlyphs

onCharsToGlyphs show a lot of contention on the exclusive lock.
See:
https://pprof.corp.google.com/user-profile?id=efff7e7bde54d93f4351cd7adabbcbbd&tab=graph

Make the optimistic conversion use a shared lock, and only
move to an exclusive lock if chars are missing.

Bug: b/182395513

Change-Id: Idcb54687aec12a1aeb710c591d1cc5a5bad66682
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/408336
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2 files changed