Related PR : #5691
The result of `TopKSelector` may be wrong when `trim()` is invoked and quiksort fallback to `Arrasys.sort()`. Because `Arrasys.sort()` is been used by mistake there.
Following test case can trigger this bug.
```
{
    int n = 10000;
    int k = 10000;
    int testIteration = 10;
    Random random = new Random(System.currentTimeMillis());
    for (int iter = 0; iter < testIteration; iter ++) {
      // target array to be sorted using TopKSelector
      List<Integer> target = new ArrayList<>();
      for (int i = 0; i < 9; i++) {
        List<Integer> sortedArray = new ArrayList();
        for (int j = 0; j < n; j++) {
          sortedArray.add(random.nextInt());
        }
        sortedArray.sort(Integer::compareTo);
        target.addAll(sortedArray);
      }

      TopKSelector<Integer> top = TopKSelector.least(k, Integer::compareTo);
      for (int value : target) {
        top.offer(value);
      }

      target.sort(Integer::compareTo);
      assertEquals(top.topK(), target.subList(0, k));
    }
  }
```
private final @Nullable T[] buffer;
  private int bufferSize;
  /**
   * The largest of the lowest k elements we've seen so far relative to this comparator. If
   * bufferSize ≥ k, then we can ignore any elements greater than this value.
   */
  @CheckForNull private T threshold;
  private TopKSelector(Comparator<? super T> comparator, int k) {
    this.comparator = checkNotNull(comparator, "comparator");
    this.k = k;
    checkArgument(k >= 0, "k (%s) must be >= 0", k);
    checkArgument(k <= Integer.MAX_VALUE / 2, "k (%s) must be <= Integer.MAX_VALUE / 2", k);
    this.buffer = (T[]) new Object[IntMath.checkedMultiply(k, 2)];
    this.bufferSize = 0;
    this.threshold = null;
  }
  /**
   * Adds {@code elem} as a candidate for the top {@code k} elements. This operation takes amortized
   * O(1) time.
   */
  public void offer(@ParametricNullness T elem) {
    if (k == 0) {
      return;
    } else if (bufferSize == 0) {
      buffer[0] = elem;
      threshold = elem;
      bufferSize = 1;
    } else if (bufferSize < k) {
      buffer[bufferSize++] = elem;
      //