Update elasticsearch output to respect the 'index'

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.
Merge pull request #4 from talevy/fix/1901

Update elasticsearch output to respect the 'index'
moved auth and ssl setup to own methods