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
notNullValue()
        );
        assertThat(executionState.snapshotRepository(), is(generateSnapshotNameStep.getSnapshotRepository()));
        assertThat(executionState.snapshotName(), containsString(indexName.toLowerCase(Locale.ROOT)));
        assertThat(executionState.snapshotName(), containsString(policyName.toLowerCase(Locale.ROOT)));
        
        newClusterState = generateSnapshotNameStep.performAction(indexMetadata.getIndex(), newClusterState);
        LifecycleExecutionState repeatedState = newClusterState.metadata().index(indexName).getLifecycleExecutionState();
        assertThat(repeatedState.snapshotIndexName(), is(executionState.snapshotIndexName()));
        assertThat(repeatedState.snapshotRepository(), is(executionState.snapshotRepository()));
        assertThat(repeatedState.snapshotName(), is(executionState.snapshotName()));
    }
    public void testPerformActionRejectsNonexistentRepository() {
        String indexName = randomAlphaOfLength(10);
        String policyName = "test-ilm-policy";
        final IndexMetadata indexMetadata = IndexMetadata.builder(indexName)
            .settings(settings(Version.CURRENT).put(LifecycleSettings.LIFECYCLE_NAME, policyName))
            .numberOfShards(randomIntBetween(1, 5))
            .numberOfReplicas(randomIntBetween(0, 5))
            .build();
        GenerateSnapshotNameStep generateSnapshotNameStep = createRandomInstance();
        ClusterState clusterState = ClusterState.builder(emptyClusterState())
            .metadata(Metadata.builder().put(indexMetadata, false).putCustom(RepositoriesMetadata.TYPE, RepositoriesMetadata.EMPTY).build())
            .build();
        IllegalStateException illegalStateException = expectThrows(
            IllegalStateException.class,
            () -> generateSnapshotNameStep.performAction(indexMetadata.getIndex(), clusterState)
        );
        assertThat(
            illegalStateException.getMessage(),