Stable sort keys
There are two major changes to worklet::Keys
with this change:
- The key sorting is now stable.
- The input key array is no longer modified (though the sorted array can be easily constructed via permutation).
Also adds a StableSortIndices
worklet, which computes a permutation index array that stable sorts and optionally uniquifies an input array.
This is needed for the VertexClustering
revamp.