amendment 1, to squash later

- handle other exceptional situations during retries as well
- improve and add tests
amendment 2, to squash later

- improve resilience by using timeout for semaphore acquires
- turn test into an ElasticsearchIntegrationTest