This fixes#127629. It's still a bit slower than it used to be when there are
lots of instances, but that fixes the main bottleneck that was introduced in
#116582. The issue was that we iterated over all attributes of all instances,
but it should only be necessary to iterate over the instances of each unique
geometry only once.
There is still quite some optimization potential in the Realize Instances code
for the case when realizing lots of instances. Especially the code to gather all
geometries that should be realized can still be made more efficient by reducing
redundant work and using multi-threading.
Pull Request: https://projects.blender.org/blender/blender/pulls/128699