Display previews of all supported media types

**This is beta code and still contains a lot of calls to console.log OC_Log::write**
This modification does the following:
* Introduces a list of media types that a Gallery apps should be able to show
* Checks that list against the list of media types supported by the system before populating any images array
* Tries to fail gracefully while we wait for https://github.com/owncloud/core/pull/12546
* Tries to harmonize code across all the files in the ajax folder
* Removes some (apparently) dead code (thumbnail.php)
* Maintains compatibility with OC7, assuming [it has been patched to support more bitmap previews](https://gist.github.com/oparoz/229c07bbcb8a209481f7)

Known issues
* The Preview or thumbnail generation methods have not been touched by this PR (yet), so thumbnails of small documents may appear distorted, just like when using master
* If the SVG provider is not turned on, the Gallery will try to display SVGs natively, without checking if it's supported by the browser
* The slideshow will still hang if it encounters a file which has failed to be converted and the fallback doesn't work in this case either. This can be fixed via this core PR: https://github.com/owncloud/core/pull/12546