Resolve QQuickItemPrivate::beforePaintNode dynamically.

It will be the 0 unless the item has a direct child with negative z,
which occurs very rarely.  Its presence complicates the algorithm used
to solve QTBUG-34255 and it wastes 8 bytes per visual item.

No difference could be noted in a benchmark animating 6000+ sprites.

Task-number: QTBUG-34255
Change-Id: Id0a78a246f0d621a51c8caad23da02b55d59b9bb
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Use QWindow::requestUpdate in threaded renderloop.

The default implementation is the same as what we do with the exhaust
delay, but it is now possible for platforms to line it up with vsync
so the GUI thread doesn't spend so much time being blocked.

Change-Id: Ie126f00a1be978608bf2a1db33d80d7f0458590d
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Only delete all child nodes twice if effectRefEffectivelyChanged is set.

We already handle ChildrenUpdateMask again in the general case below, so this
second clear doesn't make sense, *but* for the fact that we are modifying
groupNode here when effectRefEffectivelyChanged is set. So keep doing it for
that case.

As a nice side-effect, this means that groupNode is not always allocated.

Also, don't fetch groupNode redundantly if we are clearing nodes.

Task-number: QTBUG-34255
Change-Id: Icc01b942d3c09c17300e19d61e9a65f220004796
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>