Failing test for #298
Failing test for #300
Make sure records are created with a string _id

In mongoose v3.4.0 if the schema has the _id field set as a string and
no _id is provided it will generate an ObjectId. By explicitly giving a
default value for this field we avoid this issue.
Update mongoose to v3.8.4

This version of mongoose correctly handles assigning whole documents to
a string value field by casting it to the document's _id value as a
string, rather than a JSON representation of the document. This fixes
the issue detailed in #298 with creating memberships in the Migration
Tool.

The reason it's locked at 3.8.4 rather than using the latest (3.8.5) is
explained in mysociety/popit-api@0d6288a, but the short version is that
popit and popit-api don't play nicely when they both use the same
mongoose version.
Fix test failures resulting from mongoose upgrade

* Update error display to use the `.message` attribute of the error
* Remove invalid mongo queries [1] in the autocomplete module
* Add custom error messages to the instance model to match test
  expectations

[1] https://github.com/LearnBoost/mongoose/wiki/3.8-Release-Notes#validation-against-nonsensical-queries
Print number of records reindexed from each database

The reindex command no longer performs this printing for us, see
mysociety/popit-api@c37af65.
Re-index records after import

This works as intended, however the tests hang at the end of running, I
think because the elasticsearch connection is left open. This wasn't a
problem in popit-api because we're using mocha to run our tests, which
simply exits after they've all finished.
Make sure elasticsearch connection is closed after tests

This was causing the migration tests to hang because they called the
reIndex function, which establishes a connection to elasticsearch, but
doesn't take care of closing it down again.