Custom font matching and font sources

Implement a simple font sorter (FontSelector) and an interface to deal
with multiple font sources (FontProvider). Unfinished business,
but works for the most part. Currently the only implemented FontProvider
uses fontconfig.
Merge branch 'master' into fonts
Trim spaces of font family strings

This adds a trimming utility function that is used for trimming strings
of font requests in the font sorter.
Fix trimming function

Did not correctly handle empty strings (only whitespace). Whoops.
Never add a face twice to an ASS_Font

Introduce a unique ID per font face and check it in add_face to make
sure we never add a font face twice. This is useful in case the glyph
coverage report is unreliable.
Add glyph coverage map for embedded fonts

Introduce a simple glyph coverage map (created when the font is added)
and use it for checking glyph coverage in font selection. This uses a
simple linear search at the moment.
Convert embedded font handling to a real font provider
Improve font selector/provider documentation
Add reference to font provider in font database

This provides more flexibility than just referencing the callbacks:
we can identify the font provider (useful for removing fonts when a
provider is freed) and possibly access the font provider private data.
Fix off-by-one bug in font matching
Fix compilation without fontconfig

Conditionally add the fontconfig provider. We can actually run
without fontconfig now! That is, if embedded fonts or fallbacks are
good enough.
Restore fontconfig runtime configuration

Pass the fontconfig configuration file option and enable switch
through into the font selector. This restores some of the old
functionality related to fontconfig.

However, the functionality to delay the fontconfig database update will
not come back. This is not a big problem. Later it will be possible to
manually add the fontconfig provider, which will delay the update in a
comparable way.
Don't match any font if there's no glyph coverage

Do not return a font face at all instead of using the last one. Fixes
fallback to the default font path.
Add a fixed set of fallback fonts

Add a small set of fixed fallback fonts, some of them with very wide
glyph coverage.
Fix similarity calculations
Use TrueType font weight scale

fontconfig uses an unusual scale from 0-215 for the font weight. It
looks like it is somewhat derived from the typographic scale some font
families use, but is still rather nonstandard. Nowadays the TrueType
scale from 100-900 seems to be standard. CSS uses it, for example.

However, most importantly, VSFilter also uses the TrueType scale. So
let's use it in libass, too.
Check weight and slant validity in font provider

When adding a new font, check that weight and slant are valid. If
they're not, use reasonable defaults.
oops: remove debug output
Add convenience defines for slant values

There is no standard scale for slant. This is almost a boolean
attribute. However, a font can have a real italic variant, and/or a
simple oblique variant. fontconfig's notation supports both of these,
so it makes sense to reuse that notation for the sake of flexibility;
we might need to differentiate between them.
Free a provider's fonts when it is freed

When a provider is freed, iterate the font database, free all fonts
that belong to that provider and compact the database afterwards.