Use a simple QGraphicsPixmapItem for drawing raster images
RasterImageView was using a custom implementation that would use two QPixmaps to do double buffered rendering. However, since Qt already renders things double buffered, we are doing duplicate work. So drop that and just use QGraphicsPixmapItem so we rely on Qt to handle optimisations. This removes a lot of error-prone and difficult to follow custom code.
Additionally, we can move the background painting to a custom QGraphicsItem which allows us to avoid duplicating the background painting between the different views.
Also cleanup the JPEG version detection code since that broke while I was working on it and there is a better solution now.
Edited by Arjen Hiemstra