Allow third party code to hook-up MIME type detection

Adding 3 hooks to MimeMagic.php

- MimeMagicInit: Add assignments of MIME types -> Media types
  and assignments of MIME types -> File extensions
- MimeMagicImproveFromExtension: Further improve the MIME type detected
  by considering the file extension
- MimeMagicGuessFromContent: Guess the MIME from file content

This is the successor of Icf9eec10bec7c0a7e.

PHP's own module fileinfo module is not capable detecting Chemical
table files. Instead, they are reported as text/plain.

MediaHandlers can be attached by MIME type only. That's why these
changes are required for [[Extension:MolHandler]] to work.

Clean up:
Do not create unused property MimeMagic::mToMime.

Change-Id: I67f3e4e83b47e6df0d9e8371f09a741a8aa77651
Merge "Allow third party code to hook-up MIME type detection"