### 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
return settings;
    }
    private void putFollowerTemplate(String setting, String settingValue) throws InterruptedException, ExecutionException {
        Template template = new Template(Settings.builder().put(setting, settingValue).build(), null, null);
        ComposableIndexTemplate cit = new ComposableIndexTemplate(List.of("follower"), template, null, null, null, null);
        assertAcked(
            followerClient().execute(
                PutComposableIndexTemplateAction.INSTANCE,
                new PutComposableIndexTemplateAction.Request("my-it").indexTemplate(cit)
            ).get()
        );
    }
    public static class PrivateSettingPlugin extends Plugin {
        static final Setting<String> INDEX_INTERNAL_SETTING = Setting.simpleString(
            "index.internal",
            Setting.Property.IndexScope,
            Setting.Property.InternalIndex
        );
        static final Setting<String> INDEX_PRIVATE_SETTING = Setting.simpleString(
            "index.private",
            Setting.Property.IndexScope,
            Setting.Property.PrivateIndex
        );
        @Override
        public List<Setting<?>> getSettings() {
            return Arrays.asList(INDEX_INTERNAL_SETTING, INDEX_PRIVATE_SETTING);
        }
    }
}