added support for terminate_after elasticsearch/elasticsearch#6885
Merge pull request #1128 from elasticsearch/feature/terminate-after

added support for terminate_after elasticsearch/elasticsearch#6885