Update elasticsearch output to respect the 'index' in templates

Now the elasticsearch output plugin will respect the
'index' plugin setting and override the default index
template to update the indexes it matches on based on
the 'index' setting.

Any placeholders ("%{...}") will be translated to '*' so the
template matching pattern is generic and in line with elasticsearch
wildcarding.

e.g

index: "newindex-%{YYYY}" will update template to include...
```
{
template: "newindex-*"
...
}
```
@talevy can we put `@index.gsub(/%\{[^}]+\}/, "*")` in a function and test it? better if we can test `get_template` overall too