Added support for aliases to index templates

This PR finalizes the work that has been done in #2739 towards adding support for aliases to index templates.

Aliases can now be specified when creating an index template as follows:

```
curl -XPUT localhost:9200/_template/template_1 -d '
{
    "template" : "te*",
    "settings" : {
        "number_of_shards" : 1
    },
    "aliases" : {
        "alias1" : {},
        "alias2" : {
            "filter" : {
                "term" : {"user" : "kimchy" }
            },
            "routing" : "kimchy"
        },
        "{index}-alias" : {}
    }
}
'
```

The `{index}` placeholder within the alias name will be replaced with the actual index name that the template gets applied to during index creation.