Fix version handling in the scene tree
The version type changed in the node handle, but the type we used for
the versioning of the node storage did not. This meant we wouldn't
properly handle the case where the version number wrapped around. In
most cases the version numbering won't be update all that often, but
there are cases where items are constantly being destroyed and
re-created, and in that case this would cause the scene to "disappear".
With this change we now consistently use the same type all over and a
new test case was added to catch this exact case.
Pick-to: 6.11
Fixes: QTBUG-145819
Change-Id: Ibcaa253a334e60f4e793487fbf257893c535a555
Reviewed-by: Andy Nichols <andy.nichols@qt.io>