miscellaneous cms fixes:
- new functions for creating cms transforms which optimize case were input and output profiles are identical
- #4107 patch
- changes made in cms tab (doc prefs) were not taken into account or badly
- enhance behavior when disabling cms in doc prefs