[QImageItem/QPixmapItem] Don't lose precision during calculation
Operate on QRectF/QSizeF and only round back to integer at the end.
Differential Revision: https://phabricator.kde.org/D25685