### 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/action/admin/cluster/node/stats/NodeStatsTests.java
}
            httpStats = new HttpStats(randomNonNegativeLong(), randomNonNegativeLong(), clientStats);
        }
        AllCircuitBreakerStats allCircuitBreakerStats = null;
        if (frequently()) {
            int numCircuitBreakerStats = randomIntBetween(0, 10);
            CircuitBreakerStats[] circuitBreakerStatsArray = new CircuitBreakerStats[numCircuitBreakerStats];
            for (int i = 0; i < numCircuitBreakerStats; i++) {
                circuitBreakerStatsArray[i] = new CircuitBreakerStats(
                    randomAlphaOfLengthBetween(3, 10),
                    randomNonNegativeLong(),
                    randomNonNegativeLong(),
                    randomDouble(),
                    randomNonNegativeLong()
                );
            }
            allCircuitBreakerStats = new AllCircuitBreakerStats(circuitBreakerStatsArray);
        }
        ScriptStats scriptStats = null;
        if (frequently()) {
            int numContents = randomIntBetween(0, 20);
            List<ScriptContextStats> stats = new ArrayList<>(numContents);
            HashSet<String> contexts = new HashSet<>();
            for (int i = 0; i < numContents; i++) {
                String context = randomValueOtherThanMany(contexts::contains, () -> randomAlphaOfLength(12));
                contexts.add(context);
                stats.add(new ScriptContextStats(context, randomLongBetween(0, 1024), randomTimeSeries(), randomTimeSeries()));
            }
            scriptStats = new ScriptStats(stats);
        }