Seen in an exception stack trace: we are wrapping `ApiFilteringActionFilter` around itself many times, once per filtered action, so effectively every action is doing a linear scan of the filtered actions, implemented recursively. I'm pretty sure a hashmap would be more efficient, and would avoid inflating the stack so much too.

```
    at org.elasticsearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:86) ~[elasticsearch-8.11.0-SNAPSHOT.jar:?]
    at org.elasticsearch.action.support.ActionFilter$Simple.apply(ActionFilter.java:53) ~[elasticsearch-8.11.0-SNAPSHOT.jar:?]
    at org.elasticsearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:84) ~[elasticsearch-8.11.0-SNAPSHOT.jar:?]
    at org.elasticsearch.xpack.core.api.filtering.ApiFilteringActionFilter.apply(ApiFilteringActionFilter.java:53) ~[?:?]
    at org.elasticsearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:84) ~[elasticsearch-8.11.0-SNAPSHOT.jar:?]
    at org.elasticsearch.xpack.core.api.filtering.ApiFilteringActionFilter.apply(ApiFilteringActionFilter.java:53) ~[?:?]
    at org.elasticsearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:84) ~[elasticsearch-8.11.0-SNAPSHOT.jar:?]
    at org.elasticsearch.xpack.core.api.filtering.ApiFilteringActionFilter.apply(ApiFilteringActionFilter.java:53) ~[?:?]
    at org.elasticsearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:84) ~[elasticsearch-8.11.0-SNAPSHOT.jar:?]
    at org.elasticsearch.xpack.core.api.filtering.ApiFilteringActionFilter.apply(ApiFilteringActionFilter.java:53) ~[?:?]
    at org.elasticsearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:84) ~[elasticsearch-8.11.0-SNAPSHOT.jar:?]
    at org.elasticsearch.xpack.core.api.filtering.ApiFilteringActionFilter.apply(ApiFilteringActionFilter.java:53) ~[?:?]
    at org.elasticsearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:84) ~[elasticsearch-8.11.0-SNAPSHOT.jar:?]
    at org.elasticsearch.xpack.core.api.filtering.ApiFilteringActionFilter.apply(ApiFilteringActionFilter.java:53) ~[?:?]
    at org.elasticsearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:84) ~[elasticsearch-8.11.0-SNAPSHOT.jar:?]
    at org.elasticsearch.xpack.core.api.filtering.ApiFilteringActionFilter.apply(ApiFilteringActionFilter.java:53) ~[?:?]
    at org.elasticsearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:84) ~[elasticsearch-8.11.0-SNAPSHOT.jar:?]
    at org.elasticsearch.xpack.core.api.filtering.ApiFilteringActionFilter.apply(ApiFilteringActionFilter.java:53) ~[?:?]
    at org.elasticsearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:84) ~[elasticsearch-8.11.0-SNAPSHOT.jar:?]
    at org.elasticsearch.xpack.core.api.filtering.ApiFilteringActionFilter.apply(ApiFilteringActionFilter.java:53) ~[?:?]
    at org.elasticsearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:84) ~[elasticsearch-8.11.0-SNAPSHOT.jar:?]
    at org.elasticsearch.xpack.core.api.filtering.ApiFilteringActionFilter.apply(ApiFilteringActionFilter.java:53) ~[?:?]
    at org.elasticsearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:84) ~[elasticsearch-8.11.0-SNAPSHOT.jar:?]
    at org.elasticsearch.xpack.core.api.filtering.ApiFilteringActionFilter.apply(ApiFilteringActionFilter.java:53) ~[?:?]
    at org.elasticsearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:84) ~[elasticsearch-8.11.0-SNAPSHOT.jar:?]
    at org.elasticsearch.xpack.core.api.filtering.ApiFilteringActionFilter.apply(ApiFilteringActionFilter.java:53) ~[?:?]
    at org.elasticsearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:84) ~[elasticsearch-8.11.0-SNAPSHOT.jar:?]
    at co.elastic.elasticsearch.api.validation.PublicSettingsValidationActionFilter.apply(PublicSettingsValidationActionFilter.java:101) ~[?:?]
    at org.elasticsearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:84) ~[elasticsearch-8.11.0-SNAPSHOT.jar:?]
    at org.elasticsearch.xpack.core.api.filtering.ApiFilteringActionFilter.apply(ApiFilteringActionFilter.java:53) ~[?:?]
    at org.elasticsearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:84) ~[elasticsearch-8.11.0-SNAPSHOT.jar:?]
    at org.elasticsearch.xpack.core.api.filtering.ApiFilteringActionFilter.apply(ApiFilteringActionFilter.java:53) ~[?:?]
    at org.elasticsearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:84) ~[elasticsearch-8.11.0-SNAPSHOT.jar:?]
    at org.elasticsearch.xpack.security.action.filter.SecurityActionFilter.lambda$applyInternal$3(SecurityActionFilter.java:163) ~[?:?]
    at org.elasticsearch.action.ActionListenerImplementations$DelegatingFailureActionListener.onResponse(ActionListenerImplementations.java:212) ~[elasticsearch-8.11.0-SNAPSHOT.jar:?]
```
server/src/main/java/org/elasticsearch/action/ActionModule.java
private final ThreadPool threadPool;
    private final ReservedClusterStateService reservedClusterStateService;
    private final RestExtension restExtension;
    public ActionModule(
        Settings settings,
        IndexNameExpressionResolver indexNameExpressionResolver,
        IndexScopedSettings indexScopedSettings,
        ClusterSettings clusterSettings,
        SettingsFilter settingsFilter,
        ThreadPool threadPool,
        List<ActionPlugin> actionPlugins,
        NodeClient nodeClient,
        CircuitBreakerService circuitBreakerService,
        UsageService usageService,
        SystemIndices systemIndices,
        Tracer tracer,
        ClusterService clusterService,
        List<ReservedClusterStateHandler<?>> reservedStateHandlers,
        RestExtension restExtension
    ) {
        this.settings = settings;
        this.indexNameExpressionResolver = indexNameExpressionResolver;
        this.indexScopedSettings = indexScopedSettings;
        this.clusterSettings = clusterSettings;
        this.settingsFilter = settingsFilter;
        this.actionPlugins = actionPlugins;
        this.threadPool = threadPool;
        actions = setupActions(actionPlugins);
        actionFilters = setupActionFilters(actionPlugins);
        autoCreateIndex = new AutoCreateIndex(settings, clusterSettings, indexNameExpressionResolver, systemIndices);