This adds a new GeometrySet::modify_geometry_sets method that can be used to update each sub-geometry-set separately.
There are a couple of ways in which this can be improved:
- Multi-threading.
- Deduplicate more instances. E.g. if two geometry sets reference the same object, the object will currently be processed twice.
I have to put some more thought into this to figure out how to do it well. However, the general interface should work already and can be used to update nodes.
Also I had to use std::unique_ptr<GeometrySet> in InstanceReference again for correctness. Otherwise we might accidentally modify a geometry set that is also used somewhere else. This can also be improved a bit later.
Part of T91672.