### 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/test/java/org/elasticsearch/threadpool/ThreadPoolStatsTests.java
public void testSerialization() throws IOException {
        var original = new ThreadPoolStats(randomList(2, ThreadPoolStatsTests::randomStats));
        var other = serialize(original);
        assertNotSame(original, other);
        assertEquals(original, other);
    }
    private static ThreadPoolStats serialize(ThreadPoolStats stats) throws IOException {
        var out = new BytesStreamOutput();
        stats.writeTo(out);
        return new ThreadPoolStats(out.bytes().streamInput());
    }
    public static ThreadPoolStats.Stats randomStats() {
        return randomStats(randomFrom(THREAD_POOL_TYPES.keySet()));
    }
    public static ThreadPoolStats.Stats randomStats(String name) {
        return new ThreadPoolStats.Stats(
            name,
            randomMinusOneOrOther(),
            randomMinusOneOrOther(),
            randomMinusOneOrOther(),
            randomMinusOneOrOther(),
            randomMinusOneOrOther(),
            randomMinusOneOrOther()
        );
    }
    private static int randomMinusOneOrOther() {
        return randomBoolean() ? -1 : randomIntBetween(0, Integer.MAX_VALUE);
    }
}