Support index aliases in index templates.

Aliases can be specified in index templates from config and via the API.
Support {index} token in index template aliases - When updating index creation metadata from a template, check the alias name for an {index} token and replace it with the name of the index to which it is being applied. This makes it easy to apply rolling dated aliases in line with schemes like that used by logstash, e.g. allowing for an alias called myalias-logstash-2013.09.05 where the alias string is "myalias-{index}" and the index name is logstash-2013.09.05.

Not all items in code review are addressed. See comments with 'FIXME: jbrook'
Fixed bug