A script to replace the database for a particular PopIt instance

This is missing any way to bring down the PopIt instance before
replacing its database (see #516) and also has the problem that there
are Elasticsearch timeouts when reindexing:

  Error: Request Timeout after 30000ms
      at null.<anonymous>
  (/data/vhost/popit.mysociety.org/popit/node_modules/popit-api/node_modules/elasticsearch/src/lib/transport.js:272:15)
      at Timer.listOnTimeout [as ontimeout] (timers.js:110:15)
Could you assign this script to a bash variable then use `node --eval "$REINDEX_SCRIPT"` to avoid the need to create a temporary file? Doing that would also remove the need to `export NODE_PATH` below, since you'd be running the script from the directory with node_modules in.