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
actionPlugins.stream().flatMap(p -> p.getActions().stream()).forEach(actions::register);
        
        actions.register(StartPersistentTaskAction.INSTANCE, StartPersistentTaskAction.TransportAction.class);
        actions.register(UpdatePersistentTaskStatusAction.INSTANCE, UpdatePersistentTaskStatusAction.TransportAction.class);
        actions.register(CompletionPersistentTaskAction.INSTANCE, CompletionPersistentTaskAction.TransportAction.class);
        actions.register(RemovePersistentTaskAction.INSTANCE, RemovePersistentTaskAction.TransportAction.class);
        
        actions.register(RetentionLeaseActions.Add.INSTANCE, RetentionLeaseActions.Add.TransportAction.class);
        actions.register(RetentionLeaseActions.Renew.INSTANCE, RetentionLeaseActions.Renew.TransportAction.class);
        actions.register(RetentionLeaseActions.Remove.INSTANCE, RetentionLeaseActions.Remove.TransportAction.class);
        
        actions.register(ListDanglingIndicesAction.INSTANCE, TransportListDanglingIndicesAction.class);
        actions.register(ImportDanglingIndexAction.INSTANCE, TransportImportDanglingIndexAction.class);
        actions.register(DeleteDanglingIndexAction.INSTANCE, TransportDeleteDanglingIndexAction.class);
        actions.register(FindDanglingIndexAction.INSTANCE, TransportFindDanglingIndexAction.class);
        
        actions.register(GlobalCheckpointSyncAction.TYPE, GlobalCheckpointSyncAction.class);
        actions.register(TransportNodesSnapshotsStatus.TYPE, TransportNodesSnapshotsStatus.class);
        actions.register(TransportVerifyShardBeforeCloseAction.TYPE, TransportVerifyShardBeforeCloseAction.class);
        actions.register(TransportVerifyShardIndexBlockAction.TYPE, TransportVerifyShardIndexBlockAction.class);
        actions.register(TransportNodesListGatewayStartedShards.TYPE, TransportNodesListGatewayStartedShards.class);
        actions.register(TransportNodesListShardStoreMetadata.TYPE, TransportNodesListShardStoreMetadata.class);
        actions.register(TransportShardFlushAction.TYPE, TransportShardFlushAction.class);
        actions.register(TransportShardRefreshAction.TYPE, TransportShardRefreshAction.class);
        actions.register(TransportPrevalidateShardPathAction.TYPE, TransportPrevalidateShardPathAction.class);
        
        actions.register(GetDesiredNodesAction.INSTANCE, TransportGetDesiredNodesAction.class);
        actions.register(UpdateDesiredNodesAction.INSTANCE, TransportUpdateDesiredNodesAction.class);
        actions.register(DeleteDesiredNodesAction.INSTANCE, TransportDeleteDesiredNodesAction.class);
        actions.register(UpdateHealthInfoCacheAction.INSTANCE, UpdateHealthInfoCacheAction.TransportAction.class);