BUG:375253 Work around a bug in QTransform
Weirdly enough, this bug only occurs on Windows 10 with the latest
Wacom drivers and an older Wacom Intuos 3 or Cintiq tablet. At least,
that's what we suspect. Somehow the input from this drivers drives
the roation sensor crazy, and set rotation to NaN.
So, first step: check whether the resulting rect is valid, we now return
a 0,0 1x1 rect.
Second step: check whether the rotation value happens to be NaN and
return 0 in that case.
Third step: make sure that the rotationLikeValue() function doesn't return
NaN -- that is in the next commit.