Fix disfunctional QQuickRenderControl with multiple screens

Having a retina and non-retina screen connected resulted in getting
no output from QQuickRenderControl and QQuickWidget on the
non-retina screen.

This is caused by the fact that Quick is blindly calling
QWindow::devicePixelRatio(). This approach is wrong when using
QQuickRenderControl since the QQuickWindow does not have an actual
native window and so devicePixelRatio() merely returns some default value
which will definitely be wrong for one of the screens.

The patch fixes the problem by introducing
QQuickWindow::effectiveDevicePixelRatio(), which, via
QQuickRenderControl::renderWindowFor, supports the redirected case too.

Task-number: QTBUG-42114
Change-Id: I057e01f0a00758dde438fc9b10af3a435b06bb0b
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Fix pixelgrid snapping of native text on retina displays.

Change 63e6c9ada82dc8f16e705cef5f89292784b7ace4 introduced snapping to
the pixel grid in the vertex shader for native text, but this code was
broken on retina displays because it assumed integer only positions.
Fix it by including the retina scale factor into the rounding.

Task-number: QTBUG-38702
Change-Id: I84492b02d64f263c9fe030790e04cf79b0dc4e2f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Make effectiveDevicePixelRatio() return a qreal.

Fractional scale factors are not as broken as previously
believed, especially for Qt Quick. Keep the door open
for finding a way to support it at some point in the
future.

Change-Id: Ifeadcc53175ac6c25ea0288d5fe1966e3de408f9