### Elasticsearch Version

ALL

### Installed Plugins

_No response_

### Java Version

_bundled_

### OS Version

Darwin

### Problem Description

The `GET _ilm/policy` API could return many records (for clusters that have
many ILM policies). 
The API runs on the `transport_worker` thread so this can cause master instability
issues ( https://github.com/elastic/elasticsearch/blob/main/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/ilm/action/TransportGetLifecycleAction.java#L58 ).

This proposes moving the API on the `MANAGEMENT` thread pool and making
the API cancellable.

### Steps to Reproduce

Have thousands of ILM policies.
Repeatedly issue `GET _ilm/policy`

### Logs (if relevant)

_No response_
x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ilm/action/GetLifecycleAction.java
private final LifecyclePolicy lifecyclePolicy;
        private final long version;
        private final String modifiedDate;
        private final ItemUsage usage;
        public LifecyclePolicyResponseItem(LifecyclePolicy lifecyclePolicy, long version, String modifiedDate, ItemUsage usage) {
            this.lifecyclePolicy = lifecyclePolicy;
            this.version = version;
            this.modifiedDate = modifiedDate;
            this.usage = usage;
        }
        LifecyclePolicyResponseItem(StreamInput in) throws IOException {
            this.lifecyclePolicy = new LifecyclePolicy(in);
            this.version = in.readVLong();
            this.modifiedDate = in.readString();
            this.usage = new ItemUsage(in);
        }
        @Override
        public void writeTo(StreamOutput out) throws IOException {
            lifecyclePolicy.writeTo(out);
            out.writeVLong(version);
            out.writeString(modifiedDate);
            this.usage.writeTo(out);
        }
        public LifecyclePolicy getLifecyclePolicy() {
            return lifecyclePolicy;
        }