rpi: Fix image corruption when decoding some JPEG images

Fixes #2048
image: Never scale above im_max_{width,height} even if we get a requested width/height

Fixes #2083
rpi: Avoid trying to decode progressive JPEGs and JPEGS without exactly three color channels

Fixes #2080