video: Better support for XYZ input

With this change, XYZ input is directly converted to the output
colorspace wherever possible, and to the colorspace specified by the
tags and/or --primaries option, otherwise.

This commit also restructures some of the CMS code in gl_video.c to
hopefully make it clearer which decision is being done where and why.