### CI Link

https://gradle-enterprise.elastic.co/s/tevty3fksm3jc

### Repro line

./gradlew ':server:test' --tests "org.elasticsearch.search.aggregations.metrics.InternalTDigestPercentilesTests.testConcurrentEquals" -Dtests.seed=542D87AA584FF03D -Dtests.locale=es-AR -Dtests.timezone=Asia/Baghdad -Druntime.java=20

### Does it reproduce?

Yes

### Applicable branches

main

### Failure history

_No response_

### Failure excerpt

The failure occurs intermittently. I was able to get it to fail 2-3 times when running with `-Dtests.iters=100`. Note that I found this on my own PR CI, but it reproduces in main.

```
java.util.ConcurrentModificationException
at java.base/java.util.ArrayList.sort(ArrayList.java:1723) |  
at java.base/java.util.Collections.sort(Collections.java:145) |  
at org.elasticsearch.tdigest.SortingDigest.compress(SortingDigest.java:71) |  
at org.elasticsearch.tdigest.SortingDigest.centroids(SortingDigest.java:95) |  
at org.elasticsearch.tdigest.SortingDigest.centroidCount(SortingDigest.java:136) |  
at org.elasticsearch.tdigest.HybridDigest.centroidCount(HybridDigest.java:167) |  
at org.elasticsearch.search.aggregations.metrics.TDigestState.centroidCount(TDigestState.java:251) |  
at org.elasticsearch.search.aggregations.metrics.TDigestState.equals(TDigestState.java:169) |  
at java.base/java.util.Objects.equals(Objects.java:64)
```
libs/tdigest/src/main/java/org/elasticsearch/tdigest/SortingDigest.java
isSorted = false;
        max = Math.max(max, x);
        min = Math.min(min, x);
    }
    @Override
    public void add(List<? extends TDigest> others) {
        long valuesToAddCount = 0;
        for (TDigest other : others) {
            valuesToAddCount += other.size();
        }
        reserve(valuesToAddCount);
        for (TDigest other : others) {
            for (Centroid centroid : other.centroids()) {
                add(centroid.mean(), centroid.count());
            }
        }
    }
    @Override
    public void compress() {
        if (isSorted == false) {
            Collections.sort(values);
            isSorted = true;
        }
    }
    @Override
    public long size() {
        return values.size();
    }
    @Override
    public double cdf(double x) {