Backport of QMimeType and QMimeDatabase from Qt5 into Qt4

WWW: https://github.com/d1vanov/qt4-mimetypes
