cacorrect: new code from rawtherapee hg20130605
(cherry picked from commit 9cd695b2d4609ac3973860afaae7bcf89b0fff87)
Merge branch 'master' of https://github.com/darktable-org/darktable