mp_image: refactor colorspace guessing/fallback

This actually handles XYZ too.
vsfilter compat hack: add some autodetection