dynamic templates

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"
        },
        .......
    }

Checking if we should create a template every time there's an event is going to really hurt performance. I believe we'll have to solve this another way.