Threading fixes

Marti,

We've just prepared Ghostscript 9.07 for release, and put a release candidate up. We've had complaints back from the distros that have tested it, because it seems that we have patches in our version of LCMS that haven't made it into yours. These can all be found on the 'artifex' branch of my github little-cms repo.

3 of these are fixes for threading operation, and 3 of these are optimisations. Clearly I understand that you may not want to touch the optimisations for now, but it would be great if you could look at the threading fixes.

I have created a 'threading_fixes' branch that has these on, and with a bit of luck this should be a pull request for them.

I hope they are all self-explanatory.

Thanks!

Robin