Updated $videoExtensions: corrected a few errors

This array may be removed in the future.
extracted shared code in foto.php and large.php

Extracted the code and put it in a separate file 'media.php', resulting
in a *much* cleaner design.