core: added 'magick' image filter options. Fixed mime lookup if lossless filter was inside a mediaclass definition.

(cherry picked from commit 25fc074ac40e8d44f3a31811ef113dbc8c7ff79f)
core: fixed mediaclass lookup - now all lookups are done as documented with adherence to the module priority and the ua lookup.

(cherry picked from commit ef17340c696024c2d0ed906570e8d489075aec7f)