Added the possiblity to use dinamyc templates.

 For example: 

	elasticsearch {
                        cluster => "logstash"
                        index => "%{type}-logstash-%{+YYYY.MM.dd}"
                        template => "/etc/logstash/conf.d/%{type}-template.json"
                        template_name => "%{type}"
        }

It will also allow to parametrize the template. For example:

{
    "template": "%{type}-",
    "settings": {
      "number_of_shards"            : 5,
      "index.cache.field.type"      : "soft",
      "index.refresh_interval"      : "2s",
      "index.store.compress.stored" : true,
      "index.query.default_field"   : "@message"
    },
    .......
}