Integrated CMYK branch, worked on ICC profiles

CMYK and grayscale are now working in the same fork. I think everything
now works correctly with ICC profiles, but I'm not sure enough about
what the correct results should be.