Use QImageReader to read the reference images
QImage::load can in some versions of Qt refuse to load an image
with the wrong extension, e.g. a file.png that's actually a jpeg
file. By using QImageReader we can make sure Krita only checks
the actual contents of the image to determine its type.
BUG:419823
(cherry picked from commit f35fba8e4a6bab6b2d037044e2569f0c184278c8)