QQuickImageBase: detect scalable images without a suffix in the URL
Whether an image is loaded for the device pixel ratio depended on the
URL ending with a scalable image format suffix. But if the suffix is
omitted, a local file is still found by trying the supported suffixes
(see existingImageFileForPath()), so such an SVG was always rendered
at DPR 1.
For local files without a suffix, find the file the same way, and
determine the format from its suffix, or from its contents if it has
none. As this touches the file system, determine whether the image is
scalable only once per load and pass it to updateDevicePixelRatio(),
instead of checking it there again.
Fixes: QTBUG-113232
Pick-to: 6.12
Change-Id: I8d9e01a526058c83c079fe2ddac4f9d941983562
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>