Attaching Hooks to tweak MIME type detection

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.

MIME type detection can be also established and tweaked through the
operating system's file command on Linux and Mac but that's
non-trivial.

Change-Id: I5f7a56ccfbf7739e8cdbfa3b547e8f36653e6d86