Reindex script changes

This is needed in order for https://github.com/mysociety/popit/pull/304 to work properly.

- Work around a [bug in elasticsearch-js](https://github.com/elasticsearch/elasticsearch-js/issues/40) with client.close not working.
- Ensure that the mongoose connection is closed after reindexing.