Add drain script for elasticsearch

This is the continuation and implementation of issue #51 with concrete changes to discuss. The goal is to support zero downtime of the elasticsearch cluster during deploys (which has been a significant problem).