### Description

This applies to the following APIs:
- [x] open anomaly detection
- [x] start datafeed
- [x] start data frame analytics job
- [x] start trained model deployment

Currently, if the operation takes longer than the configured `timeout`, the response status code is `500`.

With Kibana in mind, a `4xx` response would be more suitable as it will lead to showing more useful information to the user about why the request failed.

Looking at [RFC 9110](https://www.rfc-editor.org/rfc/rfc9110.html#name-408-request-timeout), it seems the most appropriate `4xx` code would be `408 Request Timeout`, even though the RFC describes a different situation. 

The alternative, `504 Gateway Timeout`, would be more appropriate for this situation but it wouldn't improve the user experience in Kibana.
x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportStartDatafeedAction.java
+ persistentTask.getParams().getDatafeedId()
                        + "] Failed to cancel persistent task that could "
                        + "not be assigned due to ["
                        + exception.getMessage()
                        + "]",
                    e
                );
                listener.onFailure(exception);
            }
        });
    }
    private ElasticsearchStatusException createUnlicensedError(
        final String datafeedId,
        final RemoteClusterLicenseChecker.LicenseCheck licenseCheck
    ) {
        final String message = String.format(
            Locale.ROOT,
            "cannot start datafeed [%s] as it is configured to use indices on remote cluster [%s] that is not licensed for ml; %s",
            datafeedId,
            licenseCheck.remoteClusterLicenseInfo().clusterAlias(),
            RemoteClusterLicenseChecker.buildErrorMessage(MachineLearningField.ML_API_FEATURE, licenseCheck.remoteClusterLicenseInfo())
        );
        return new ElasticsearchStatusException(message, RestStatus.BAD_REQUEST);
    }
    private ElasticsearchStatusException createUnknownLicenseError(
        final String datafeedId,
        final List<String> remoteIndices,
        final Exception cause
    ) {
        final int numberOfRemoteClusters = RemoteClusterLicenseChecker.remoteClusterAliases(