### 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
ShardRouting.Role.DEFAULT
        );
        Path path = createTempDir().resolve("indices")
            .resolve(shardRouting.shardId().getIndex().getUUID())
            .resolve(String.valueOf(shardRouting.shardId().id()));
        ShardPath shardPath = new ShardPath(false, path, path, shardRouting.shardId());
        return new ShardStats(shardRouting, shardPath, createShardLevelCommonStats(), null, null, null, false, 0);
    }
    public static NodeStats createNodeStats() {
        DiscoveryNode node = TestDiscoveryNode.create(
            "test_node",
            buildNewFakeTransportAddress(),
            emptyMap(),
            emptySet(),
            VersionUtils.randomVersion(random())
        );
        NodeIndicesStats nodeIndicesStats = null;
        if (frequently()) {
            final Index indexTest = new Index("test", "_na_");
            Map<Index, CommonStats> statsByIndex = new HashMap<>();
            statsByIndex.put(indexTest, createIndexLevelCommonStats());
            ShardId shardId = new ShardId(indexTest, 0);
            ShardStats shardStat = createShardStats(shardId);
            IndexShardStats shardStats = new IndexShardStats(shardId, new ShardStats[] { shardStat });
            Map<Index, List<IndexShardStats>> statsByShard = new HashMap<>();
            List<IndexShardStats> indexShardStats = new ArrayList<>();
            indexShardStats.add(shardStats);
            statsByShard.put(indexTest, indexShardStats);
            CommonStats oldStats = new CommonStats(CommonStatsFlags.ALL);
            nodeIndicesStats = new NodeIndicesStats(oldStats, statsByIndex, statsByShard);