MDL-42616 filelib: New user interface to edit and add file types

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