### Description

It is impossible to create a follower index with a `$` character in its name (please note, it is possible to create a regular index with `$` in its name).

This could be reproduced by rest request:
```
PUT /my-index/_ccr/follow
{
    "remote_cluster": "my-remote-cluster",
    "leader_index": "my-index$follower"
}
```

or `CcrIntegTestCase`:

```
    public void testFollowIndex() throws Exception {
        assertAcked(leaderClient().admin().indices().prepareCreate("my$index"));
        setupRemoteCluster();
        final PutFollowAction.Request followRequest = putFollow("my$index", "my$index");
        followerClient().execute(PutFollowAction.INSTANCE, followRequest).get();
    }
```

This is happening as during initial follow phase we restore the leader cluster from the remote using a snapshot restore.
Corresponding request is created with index name added to `RestoreSnapshotRequest#renamePattern` (regexp) without escaping `$`.

x-pack/plugin/ccr/src/internalClusterTest/java/org/elasticsearch/xpack/ccr/IndexFollowingIT.java
);
        assertThat(forbiddenException.status(), equalTo(RestStatus.FORBIDDEN));
        pauseFollow("index-2");
        followerClient().admin().indices().close(new CloseIndexRequest("index-2")).actionGet();
        assertAcked(followerClient().execute(UnfollowAction.INSTANCE, new UnfollowAction.Request("index-2")).actionGet());
        followerClient().admin().indices().open(new OpenIndexRequest("index-2")).actionGet();
        assertAcked(followerClient().admin().indices().putMapping(putMappingRequest).actionGet());
    }
    public void testDoNotAllowAddAliasToFollower() throws Exception {
        final String leaderIndexSettings = getIndexSettings(between(1, 2), between(0, 1));
        assertAcked(leaderClient().admin().indices().prepareCreate("leader").setSource(leaderIndexSettings, XContentType.JSON));
        followerClient().execute(PutFollowAction.INSTANCE, putFollow("leader", "follower")).get();
        final IndicesAliasesRequest request = new IndicesAliasesRequest().masterNodeTimeout(TimeValue.MAX_VALUE)
            .addAliasAction(IndicesAliasesRequest.AliasActions.add().index("follower").alias("follower_alias"));
        final ElasticsearchStatusException e = expectThrows(
            ElasticsearchStatusException.class,
            () -> followerClient().admin().indices().aliases(request).actionGet()
        );
        assertThat(
            e,
            hasToString(
                containsString(
                    "can't modify aliases on indices [follower]; "
                        + "aliases of following indices are self-replicated from their leader indices"
                )
            )
        );
        assertThat(e.status(), equalTo(RestStatus.FORBIDDEN));
    }
    public void testAddAliasAfterUnfollow() throws Exception {