Add a configuration switch for enabled preview mimetypes

Do not merge - requires discussion and some fine-tuning.

@MTRichards @karlitschek @craigpg See mail. THX.