Implementation of the FreeType 2 cache subsystem, which limits the
number of concurrently-opened FT_Face and FT_Size objects, as well as
caching information like character maps to speed up glyph id lookups.
This time with the option of opening FontBLFs that are not cached.
Like D13137: BLF: Implement FreeType Caching, this patch implements the FreeType caching system. However, this time it allows the option of opening FontBLF objects that are not managed by the cache.
blf_font_new_ex is extended to allow the passing of a custom FT_Library object. If NULL it uses the global static object, is managed by the cache, and gets a new BLF_CACHED font flag. If you pass an FT_Library object it behaves as it does now, using non-cache code. It adds slight complication to support both caching and not, but it isn't too bad.
This time the maximum number of faces that the cache can keep open is set to four - since we normally have three in use in normal operation.
BLF_thumb_preview was an issue before because it creates as many simultaneous thumbnails as the number processor cores. Now it just uses a custom FT_Library and works threaded well with very few changes.
BLF_display_name_from_file could have been changed similarly, but I instead rewrote it so it does not use a FontBLF at all, just FreeType calls. Could be a separate patch though.