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
* Does not include the delimiter in the result.
     *
     * @param toSplit   the string to split
     * @param delimiter to split the string up with
     * @return a two element array with index 0 being before the delimiter, and
     *         index 1 being after the delimiter (neither element includes the delimiter);
     *         or <code>null</code> if the delimiter wasn't found in the given input String
     */
    public static String[] split(String toSplit, String delimiter) {
        if (hasLength(toSplit) == false || hasLength(delimiter) == false) {
            return null;
        }
        int offset = toSplit.indexOf(delimiter);
        if (offset < 0) {
            return null;
        }
        String beforeDelimiter = toSplit.substring(0, offset);
        String afterDelimiter = toSplit.substring(offset + delimiter.length());
        return new String[] { beforeDelimiter, afterDelimiter };
    }
    /**
     * Tokenize the given String into a String array via a StringTokenizer.
     * Trims tokens and omits empty tokens.
     * <p>The given delimiters string is supposed to consist of any number of
     * delimiter characters. Each of those characters can be used to separate
     * tokens. A delimiter is always a single character; for multi-character
     * delimiters, consider using <code>delimitedListToStringArray</code>
     *
     * @param s        the String to tokenize
     * @param delimiters the delimiter characters, assembled as String