### Description

From the nodes stats API, we should extract the `thread_pool` stats into their own endpoint. This endpoint can then be non-node-centric, and present a global view of the number of completed, rejected, and failed operations for each of the threadpools in the system.
server/src/main/java/org/elasticsearch/threadpool/ThreadPoolStats.java
@Override
        public Iterator<? extends ToXContent> toXContentChunked(ToXContent.Params outerParams) {
            return Iterators.concat(
                ChunkedToXContentHelper.startObject(name),
                threads != -1 ? single((builder, params) -> builder.field(Fields.THREADS, threads)) : emptyIterator(),
                queue != -1 ? single((builder, params) -> builder.field(Fields.QUEUE, queue)) : emptyIterator(),
                active != -1 ? single((builder, params) -> builder.field(Fields.ACTIVE, active)) : emptyIterator(),
                rejected != -1 ? single((builder, params) -> builder.field(Fields.REJECTED, rejected)) : emptyIterator(),
                largest != -1 ? single((builder, params) -> builder.field(Fields.LARGEST, largest)) : emptyIterator(),
                completed != -1 ? single((builder, params) -> builder.field(Fields.COMPLETED, completed)) : emptyIterator(),
                ChunkedToXContentHelper.endObject()
            );
        }
    }
    public ThreadPoolStats {
        Collections.sort(stats);
        stats = Collections.unmodifiableList(stats);
    }
    public ThreadPoolStats(StreamInput in) throws IOException {
        this(in.readList(Stats::new));
    }
    @Override
    public void writeTo(StreamOutput out) throws IOException {
        out.writeList(stats);
    }
    @Override
    public Iterator<Stats> iterator() {
        return stats.iterator();
    }
    static final class Fields {