Enable gcc -Wold-style-declaration and fix issues
(cherry picked from commit 1631e3a5fb692f9a83b12944fc5358905c30b065)
Store fread result in variable with correct type - size_t
(cherry picked from commit ee49ae3abc5eb3c7212030aeb6c8732def4878cf)
Allow compilation with non-ASCII chars in the path

The problem was that we put the absolute path into darktableconfig.xml
to find the DTD. This however failed when there were some special
characters in the path. Now we just copy darktableconfig.dtd to build.
(cherry picked from commit 91ed74387d81eb600d52254ff0dd6bf744eddbab)
Fix bug #9874 where MRWs showed in purple
As it turns out the 270cw rotation was wrong. Made the code more explicit as to what it is doing with the three flip bits.
(cherry picked from commit 67483234b2864969495636f685fd5f9d42172437)