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/main/java/org/elasticsearch/xpack/core/ilm/GenerateSnapshotNameStep.java
public static ActionRequestValidationException validateGeneratedSnapshotName(String snapshotPrefix, String snapshotName) {
        ActionRequestValidationException err = new ActionRequestValidationException();
        if (Strings.hasText(snapshotPrefix) == false) {
            err.addValidationError("invalid snapshot name [" + snapshotPrefix + "]: cannot be empty");
        }
        if (snapshotName.contains("#")) {
            err.addValidationError("invalid snapshot name [" + snapshotPrefix + "]: must not contain '#'");
        }
        if (snapshotName.charAt(0) == '_') {
            err.addValidationError("invalid snapshot name [" + snapshotPrefix + "]: must not start with '_'");
        }
        if (snapshotName.toLowerCase(Locale.ROOT).equals(snapshotName) == false) {
            err.addValidationError("invalid snapshot name [" + snapshotPrefix + "]: must be lowercase");
        }
        if (Strings.validFileName(snapshotName) == false) {
            err.addValidationError(
                "invalid snapshot name ["
                    + snapshotPrefix
                    + "]: must not contain contain the following characters "
                    + Strings.INVALID_FILENAME_CHARS
            );
        }
        if (err.validationErrors().size() > 0) {
            return err;
        } else {
            return null;
        }
    }
}