Some updates for mime handling from sortsmill

This is from:
https://github.com/sortsmill/fontforge/commit/373ff5af95b1511560d37c7b498142cc7e8a9d51

And the previous few commits. It is not a straightforward diff to the mainline fontforge tree as there are changes in sortsmill which are not present in mainline.

Note that this pull request introduces a mandatory dependency on glib. Maybe in the future we can offload some of the code onto glib, for example the dynamic plugin loading, collection types etc.