WIP: Add platform independent high-dpi support to QtGui

Add coordinate scaling support to the QWindow/
QWindowSystemInterface layer. The scale factor can
be set with the QT_HIGHDPI_SCALE_FACTOR environment
variable.

Setting a scale factor different than the default (1)
now has the following effects:

QWindow::devicePixelRatio is set accordingly, enabling
the high-dpi code paths.

QWindow and related classes now return geometry in
device independent pixels. This includes screen,
desktop and window geometry as well as event coordinates.

The platform plugins continue to operate in device
pixels, unaware of the scaling.

Task-number: QTBUG-38858
Change-Id: I85b0d1bc682b25196f6db286e672a64f8da0ae5c
WIP: Introduce per-window scale factors

The qHighDpi functions now take an optional Window *
The scale factor can be set with QHighDpiScaling::
setWindowFactor(QWindow *, factor)

Change-Id: I34c80d2e031c257504d789ac5135de731d29929a
WIP: tests/manual/highdpi: Add line drawing test

Change-Id: I5b8c84ec496f584d489d5fea580e3ac76aa7a83f
WIP: Read QT_SCALE_FACTOR env. variable

Drop the "HIGHDPI" term

Change-Id: I55cb4de34f302dee7897d70ce6693fea9d66926f
WIP: Don't scale the logical dpi

Scaling results in small fonts, which is undesirable.

From a theory point of view it can also be argued
that logical dpi does not change when scaling (physical
dpi does)

Change-Id: If0bb7f86f928e4555061b2a05500688652ebe134
WIP: highdpi test: Test font pixel sizes as well.

Change-Id: Id453445739b1e219b7199139397f1a6faffcc1fc
WIP: highdpi test: Don't build an app bundle

Change-Id: I641e3837184ce1b542b5773c976c800cd8dc863c
WIP: Add logging via category "qt.scaling"

Change-Id: Ia94ba9a8961f1a31635135545ded0078a93de380
WIP: Create new backing store image on paintDevice()

Improve the layering separation between QtGui and
the platform plugin. QBackingStore no longer modifies
the image created by the platform plugin.

Change-Id: Ia542380fd8297830e07a42a061f7080b2f6172b0
WIP: Use qHighDpitoDevicePixels

Change-Id: I905398ec719786070896749633c86d33dcdc5daa
WIP: Add QPlatformWindow::window* accessors.

The platform plugins should use this to get geometry
and sizes in device pixels. (The corresponding QWindow
accessors return values in device-independent pixels).

This should be easier to use from the platform plugin
implementors point of view: there is no longer a need
to pick and use one of the qHighDpi* functions. We
can also hide implementation details like the "Constrained"
functions and normalization.

Change-Id: I1e42b56ecce99f13b1a3f86a0a8cd05afff06d42
WIP: XCB: Support high-dpi scaling

The QWindow API can now return values in device
independent pixels when QT_HIGHDPI_SCALE_FACTOR is
set.

The platform plugins operate in device pixels. Add
conversion calls for values obtained from QWindow.
(these are no-ops when QT_HIGHDPI_SCALE_FACTOR is
not set)

Task-number: QTBUG-38858
Change-Id: Id577d6413ab0bd2da67a64fe7a643a310e50d72e
WIP: Cocoa: Use window* accessors

Change-Id: I9c1240bfcf2a5707ef0a200763797edb95061134
WIP: Add QT_SCALE_FACTOR_DPI.

Setting this will de-scale the logical dpi, with the
result that point-based text is _not_ scaled by the
scale factor. (this de-scale and the painter scaling
will cancel out)

This works well when the DPI is already set to the
correct value for the screen.

Change-Id: Ibd3750fe31454c97a4298eac333d9cea32a41060
WIP: Add limited support for setting the scale

As opposed to setting the scale _factor_. Read QT_SCALE
and QT_SCALE_DPI.

Implement by canceling out any scale factor applied
by the OS, as reported by QPlatformWindow. This requires
1) a valid QWindow pointer, and 2) that the platform
window has been constructed.

Change-Id: Ibf42a43ba297dfec19b9c7881b3185549eb18df8