MDL-42616 filelib: Use config value for custom MIME types (1/2)

Uses a new optional config variable to define custom MIME types
in JSON format. Includes new API for accessing and modifying
this data.
MDL-42616 filelib: New user interface to edit and add file types (2/2)

New admin tool tool_filetypes which uses the new API to add and
modify file type definitions.