Fix disappearing nodes when adding in two levels of batch root
When having e.g. a clip node inside another clip node and adding
children to the innermost, we would get into the situation where
we did a partial rebuild for the outermost root, but its available
render order count would not be updated to reflect the change
deeper down in the tree. Since the z range would be based on the
outermost batch root's knowledge of the maximum render order in
the tree, what would happen is that the z of the rendered nodes
would increase steadily until they went outside of the viewing
volume and disappeared.
When decreasing the available order count of a batch root, we need
to also decrease the available order count of its parents. If any
of them drop below zero, we need to rebuild the render lists.
[ChangeLog][QtQuick] Fixed nodes sometimes disappearing when
adding many new nodes to the tree.
Change-Id: I39c34acf0e1e0e87601f0fcd983f8da38cee029f
Task-number: QTBUG-42096
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>