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.
server/src/main/java/org/elasticsearch/common/Strings.java
return switch (c) {
            case '\\', '/', '*', '?', '"', '<', '>', '|', ' ', ',' -> true;
            default -> false;
        };
    }
    /**
     * Copy the given Collection into a String array.
     * The Collection must contain String elements only.
     *
     * @param collection the Collection to copy
     * @return the String array (<code>null</code> if the passed-in
     *         Collection was <code>null</code>)
     */
    public static String[] toStringArray(Collection<String> collection) {
        if (collection == null) {
            return null;
        }
        return collection.toArray(String[]::new);
    }
    /**
     * Concatenate two string arrays into a third
     */
    public static String[] concatStringArrays(String[] first, String[] second) {
        if (first == null && second == null) {
            return Strings.EMPTY_ARRAY;
        }
        if (first == null || first.length == 0) {
            return second;
        }
        if (second == null || second.length == 0) {