Be stricter for file types where we don't know canonical extension

Previously if a file had a format, where we didn't have an
extension associated with it in mime.types, people could upload
it with any extension that is in $wgFileExtensions. This meant
people could upload a non-allowed file type if it had an allowed
extension, and the non-allowed file type didn't have a canonical
extension in mime.types

Bug: 39012
Change-Id: Ib373fafdfceceed65fbd23cf468f3c19196545c9
Merge "Be stricter for file types where we don't know canonical extension"