Use Qt API instead of custom implementation for Qt 5 builds

Qt 5 provides a MIME type implementation, standard paths and there are patches to improve QIcon under review now.