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
/**
     * Converts a collection of items to a string like {@link #collectionToDelimitedString(Iterable, String, String, String, StringBuilder)}
     * except that it stops if the string gets too long and just indicates how many items were omitted.
     *
     * @param coll        the collection of items to display
     * @param delim       the delimiter to write between the items (usually {@code ","})
     * @param prefix      a string to write before each item (usually {@code ""} or {@code "["})
     * @param suffix      a string to write after each item (usually {@code ""} or {@code "]"})
     * @param appendLimit if this many characters have been appended to the string and there are still items to display then the remaining
     *                    items are omitted
     */
    public static void collectionToDelimitedStringWithLimit(
        Iterable<?> coll,
        String delim,
        String prefix,
        String suffix,
        int appendLimit,
        StringBuilder sb
    ) {
        final Iterator<?> it = coll.iterator();
        final long lengthLimit = sb.length() + appendLimit; 
        int count = 0;
        while (it.hasNext()) {
            sb.append(prefix).append(it.next()).append(suffix);
            count += 1;
            if (it.hasNext()) {
                sb.append(delim);
                if (sb.length() > lengthLimit) {
                    int omitted = 0;
                    while (it.hasNext()) {