Only lock access to our glyph caches per-font, rather than globally.
Also upgrade from spinlocks to mutexes.
Each FontBLF has a glyph cache that is a resource that must be protected with locks to ensure that one thread does not delete/change while another reads. However, we are locking globally, rather than per-font. This means we cannot access the cache of a font and then do so for different font before releasing that first lock.
This global locking was necessary for early versions of FreeType, but that library is now perfectly threadsafe if a mutex lock is used around uses of FT_New_Face, FT_New_Memory_Face, and FT_Done_Face (which we do). https://freetype.org/freetype2/docs/reference/ft2-base_interface.html#ft_library
This patch also changes to the lock types from spinlocks to a mutexes as mutex is a better fit for this use and is also considered better in almost all cases.