### Elasticsearch Version

7.17

### Installed Plugins

_No response_

### Java Version

_bundled_

### OS Version

Not relevant

### Problem Description

Creating a match all index template is bad and we know it.
I needed it for a test and I created a new index template with a `*` `index_pattern`.

I wanted to delete it after few minutes (so that it wouldn't picked up by any new index creation) and I couldn't, unless updating it to match no index.

It seems to deny the deletion because it reports being used by data streams.

### Steps to Reproduce

Create a Index Template matching all:
```
PUT _index_template/matchall
{
  "index_patterns": [
    "*"
  ],
  "priority": 1,
  "template": {
    "mappings": {
      "_meta": {
        "class": "lol"
      }
    }
  }
}
```

Try to delete it:
```
DELETE _index_template/matchall
```

You get:
```
{
  "error" : {
    "root_cause" : [
      {
        "type" : "illegal_argument_exception",
        "reason" : "unable to remove composable templates [matchall] as they are in use by a data streams [.fleet-actions-results, .logs-deprecation.elasticsearch-default, .slm-history-5, ilm-history-5, logs-elastic_agent-default, logs-elastic_agent.endpoint_security-default, logs-elastic_agent.filebeat-default, logs-elastic_agent.metricbeat-default, logs-endpoint.events.file-default, logs-endpoint.events.library-default, logs-endpoint.events.network-default, logs-endpoint.events.process-default, logs-endpoint.events.registry-default, logs-endpoint.events.security-default, logs-generic-default, logs-windows.powershell-default, logs-windows.powershell_operational-default, logs-windows.sysmon_operational-default, metrics-elastic_agent.elastic_agent-default, metrics-elastic_agent.endpoint_security-default, metrics-elastic_agent.filebeat-default, metrics-elastic_agent.metricbeat-default, metrics-endpoint.metadata-default, metrics-endpoint.metrics-default, metrics-endpoint.policy-default, metrics-system.cpu-default, metrics-system.diskio-default, metrics-system.memory-default, metrics-system.network-default, metrics-system.process-default, metrics-system.process_summary-default, metrics-system.socket_summary-default, metrics-system.uptime-default, metrics-windows.perfmon-default, metrics-windows.service-default]"
      }
    ],
    "type" : "illegal_argument_exception",
    "reason" : "unable to remove composable templates [matchall] as they are in use by a data streams [.fleet-actions-results, .logs-deprecation.elasticsearch-default, .slm-history-5, ilm-history-5, logs-elastic_agent-default, logs-elastic_agent.endpoint_security-default, logs-elastic_agent.filebeat-default, logs-elastic_agent.metricbeat-default, logs-endpoint.events.file-default, logs-endpoint.events.library-default, logs-endpoint.events.network-default, logs-endpoint.events.process-default, logs-endpoint.events.registry-default, logs-endpoint.events.security-default, logs-generic-default, logs-windows.powershell-default, logs-windows.powershell_operational-default, logs-windows.sysmon_operational-default, metrics-elastic_agent.elastic_agent-default, metrics-elastic_agent.endpoint_security-default, metrics-elastic_agent.filebeat-default, metrics-elastic_agent.metricbeat-default, metrics-endpoint.metadata-default, metrics-endpoint.metrics-default, metrics-endpoint.policy-default, metrics-system.cpu-default, metrics-system.diskio-default, metrics-system.memory-default, metrics-system.network-default, metrics-system.process-default, metrics-system.process_summary-default, metrics-system.socket_summary-default, metrics-system.uptime-default, metrics-windows.perfmon-default, metrics-windows.service-default]"
  },
  "status" : 400
}
```

The list seems to be composed by all the data streams.

## Workaround

Update the `index_patterns` to something non-existing.
```
PUT _index_template/matchall
{
  "index_patterns": [
    "none"
  ],
  "priority": 1,
  "template": {
    "mappings": {
      "_meta": {
        "class": "lol"
      }
    }
  }
}
```

Then delete it:
```
DELETE _index_template/matchall
```

### Logs (if relevant)

_No response_
server/src/main/java/org/elasticsearch/cluster/metadata/MetadataIndexTemplateService.java
if (name.contains("#")) {
            validationErrors.add("name must not contain a '#'");
        }
        if (name.contains("*")) {
            validationErrors.add("name must not contain a '*'");
        }
        if (name.startsWith("_")) {
            validationErrors.add("name must not start with '_'");
        }
        if (name.toLowerCase(Locale.ROOT).equals(name) == false) {
            validationErrors.add("name must be lower cased");
        }
        for (String indexPattern : indexPatterns) {
            if (indexPattern.contains(" ")) {
                validationErrors.add("index_patterns [" + indexPattern + "] must not contain a space");
            }
            if (indexPattern.contains(",")) {
                validationErrors.add("index_pattern [" + indexPattern + "] must not contain a ','");
            }
            if (indexPattern.contains("#")) {
                validationErrors.add("index_pattern [" + indexPattern + "] must not contain a '#'");
            }
            if (indexPattern.contains(":")) {
                validationErrors.add("index_pattern [" + indexPattern + "] must not contain a ':'");
            }
            if (indexPattern.startsWith("_")) {
                validationErrors.add("index_pattern [" + indexPattern + "] must not start with '_'");
            }
            if (Strings.validFileNameExcludingAstrix(indexPattern) == false) {
                validationErrors.add(