QQmlTreeRow: Don't count the rows of a subtree recursively
QQmlTreeRow::subTreeSize(), used by QQmlTreeModel::treeSize(), called
subTreeSize() on each child, recursing once per level of the tree. A
tree nested deeply enough therefore exhausted the native stack when its
size was computed.
Count the rows iteratively instead, keeping the rows still to be
counted on an explicit stack.
Pick-to: 6.12
Task-number: QTBUG-151007
Change-Id: I38cafb089ec780b00053e52eb18d476b3a87f196
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>