Fix preview creation

Now that we detect the mimetype only by the file extension we need to be able to set the mimetype explicitly in the Preview lib. Because for example files in the trash and versioned files have the timestamp as extension.

This patch extended the Previews lib and adapted the versions and trash bin preview generation code.

fix #6105