Retry errors writing to Elasticsearch

Stud::Buffer's flush invocation automatically retries (forever) any
failures to flush.

Supersedes #1180