Fix pixel scale computation in resampler

Combine CD1_1 and CD1_2 elements in case the image is rotated.