We allow characters in the ID of an ILM policy that will result in an invalid snapshot name.

For example, an ILM policy with the name `mypolicy-*` can be created, however, the generation of the snapshot name in this line:

https://github.com/elastic/elasticsearch/blob/befb6faafc9fca327fd3cea2d0ab328a521c4e65/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ilm/GenerateSnapshotNameStep.java#L81

Results in the `mypolicy-*` being part of the snapshot name, which the snapshot service then disallows. We should strip these invalid characters from the snapshot name.
x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ilm/GenerateSnapshotNameStepTests.java
is(
                "repository ["
                    + generateSnapshotNameStep.getSnapshotRepository()
                    + "] "
                    + "is missing. [test-ilm-policy] policy for index ["
                    + indexName
                    + "] cannot continue until the repository "
                    + "is created or the policy is changed"
            )
        );
    }
    public void testPerformActionWillOverwriteCachedRepository() {
        String indexName = randomAlphaOfLength(10);
        String policyName = "test-ilm-policy";
        LifecycleExecutionState.Builder newCustomData = LifecycleExecutionState.builder();
        newCustomData.setSnapshotName("snapshot-name-is-not-touched");
        newCustomData.setSnapshotRepository("snapshot-repository-will-be-reset");
        final IndexMetadata indexMetadata = IndexMetadata.builder(indexName)
            .settings(settings(Version.CURRENT).put(LifecycleSettings.LIFECYCLE_NAME, policyName))
            .numberOfShards(randomIntBetween(1, 5))
            .numberOfReplicas(randomIntBetween(0, 5))
            .putCustom(ILM_CUSTOM_METADATA_KEY, newCustomData.build().asMap())
            .build();
        GenerateSnapshotNameStep generateSnapshotNameStep = createRandomInstance();
        
        RepositoryMetadata repo = new RepositoryMetadata(generateSnapshotNameStep.getSnapshotRepository(), "fs", Settings.EMPTY);
        ClusterState clusterState = ClusterState.builder(emptyClusterState())
            .metadata(
                Metadata.builder()
                    .put(indexMetadata, false)