Added support for aliases to index templates

Not all items in code review are addressed. See comments with 'FIXME: jbrook'
Finalized support for aliases in index templates

- adapted existing PR to updated code (post #4920)
- resolved TODOs (bw compatible serialization etc.)
- added more tests
- added docs

Closes #1825