### Description

Currently, when we execute retention policy, we also refresh the destination index by setting:
```
setRefresh(true)
```
on the DBQ request.
This can cause permission errors which are surprising to the user as the permissions are not required when the transform starts:
```
task encountered irrecoverable failure: org.elasticsearch.ElasticsearchSecurityException: action [indices:admin/refresh] is unauthorized for user [found-internal-kibana4-server] with roles [kibana_system,found-internal-kibana4-server] on indices [logs-cloud_security_posture.findings_latest-default], this action is granted by the index privileges [maintenance,manage,all]
```

We still want the user to have the permissions to delete the documents. But we should execute `refresh` as the system user.
x-pack/plugin/transform/src/main/java/org/elasticsearch/xpack/transform/transforms/RetentionPolicyToDeleteByQueryRequestConverter.java
RetentionPolicyException(String msg, Object... args) {
            super(msg, args);
        }
    }
    private RetentionPolicyToDeleteByQueryRequestConverter() {}
    /**
     * Build a {@link DeleteByQueryRequest} from a `retention policy`. The DBQ runs _after_ all data for a new checkpoint
     * has been processed (composite agg + bulk indexing) and the index got refreshed. After the DBQ - with a final index refresh -
     * the checkpoint is complete.
     *
     * @param retentionPolicyConfig The retention policy configuration
     * @param settingsConfig settings to set certain parameters
     * @param destConfig the destination config
     * @param nextCheckpoint The checkpoint that just finished
     *
     * @return a delete by query request according to the given configurations or null if no delete by query should be executed
     */
    static DeleteByQueryRequest buildDeleteByQueryRequest(
        RetentionPolicyConfig retentionPolicyConfig,
        SettingsConfig settingsConfig,
        DestConfig destConfig,
        TransformCheckpoint nextCheckpoint
    ) {
        if (nextCheckpoint == null || nextCheckpoint.isEmpty()) {
            return null;
        }
        DeleteByQueryRequest request = new DeleteByQueryRequest();
        if (retentionPolicyConfig instanceof TimeRetentionPolicyConfig) {
            request.setQuery(getDeleteQueryFromTimeBasedRetentionPolicy((TimeRetentionPolicyConfig) retentionPolicyConfig, nextCheckpoint));
        } else {