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/test/java/org/elasticsearch/common/StringsTests.java
assertNull(deleteAny((CharSequence) null, "abc"));
        assertNull(deleteAny((String) null, "abc"));
        assertThat(deleteAny(new StringBuilder("foo"), null), hasToString("foo"));
        assertThat(deleteAny("foo", null), equalTo("foo"));
        assertThat(deleteAny("abc\ndef\t", "az\n"), equalTo("bcdef\t"));
        String testStr = randomUnicodeOfLength(10);
        String delete = testStr.substring(testStr.length() - 1) + testStr.substring(0, 1);
        String expected = testStr.chars()
            .mapToObj(Character::toString)
            .filter(c -> delete.contains(c) == false)
            .collect(Collectors.joining());
        assertThat(deleteAny(testStr, delete), equalTo(expected));
        assertThat(deleteAny(new StringBuilder(testStr), delete), hasToString(expected));
    }
    public void testSplitStringToSet() {
        assertEquals(tokenizeByCommaToSet(null), Sets.newHashSet());
        assertEquals(tokenizeByCommaToSet(""), Sets.newHashSet());
        assertEquals(tokenizeByCommaToSet("a,b,c"), Sets.newHashSet("a", "b", "c"));
        assertEquals(tokenizeByCommaToSet("a, b, c"), Sets.newHashSet("a", "b", "c"));
        assertEquals(tokenizeByCommaToSet(" a ,  b, c  "), Sets.newHashSet("a", "b", "c"));
        assertEquals(tokenizeByCommaToSet("aa, bb, cc"), Sets.newHashSet("aa", "bb", "cc"));
        assertEquals(tokenizeByCommaToSet(" a "), Sets.newHashSet("a"));
        assertEquals(tokenizeByCommaToSet("   a   "), Sets.newHashSet("a"));
        assertEquals(tokenizeByCommaToSet("   aa   "), Sets.newHashSet("aa"));
        assertEquals(tokenizeByCommaToSet("   "), Sets.newHashSet());
    }
    public void testDelimitedListToStringArray() {
        String testStr;
        assertThat(delimitedListToStringArray(null, " ", "a"), emptyArray());