Fix OpenGL canvas under fractional DPI scaling
The canvas wasn't pixel-perfect even at 100% zoom when the
devicePixelRatio is non-integral. This change fixes the issue by
teaching Krita to perceive the widget/viewport size in the same manner
as Qt sets up the viewport, and to align the documentOffset to device
pixels.
Maniphest Tasks: T2299, T10765
Differential Revision: https://phabricator.kde.org/D20097