Allow multiple templates

There are a number of issues with the template define that make it impossible to add multiple templates.

The changes in these commits allow for multiple templates to be added.

A use case involving logstash is you want to have a standard logstash template e.g. http://www.logstashbook.com/code/3/elasticsearch_mapping.json but then add mappings for a custom grokked log entry.  Allowing multiple templates allows these to be split into separate modules.