Read filetype's mime type from the configuration files

This allows custom filetypes to define a mime type, hence the icon
displayed for this filetype;  as well as moving ones for built-in
filetypes out of the code to the configuration files.