Add CP mask (WIP).

This mask does a lot of things, apart from being really
annoying for users to guess. Still need to rotate some
chunks based on the rotate variable and swap R/G channels.
RGB mask now accept channel mapping.

We can now use this mask with the CP mask to
swap only Red and Green colour channels.
Complete CP mask.

The masks now correctly mirrors flagged blocks along their
diagonal axis, making the CP mask feature complete.