enable TTL and refactor ES index template injection Closes #105

Closes #105

CHANGES:
* enable ttl in ES mappings
* refactor setupIndexTempaltes.py and inject.py to use a common module

I enable the ttl feature on all types in the events index.