Automatically initialise elasticsearch.

Charmstore will now automatically initialise elasticsearch when starting up.
This ensures that elasticsearch will always have the correct index and mapping
configuration required for correct operation.
I'm not sure this is enough concurrency to actually tickle the possible problems.

Also, we shouldn't call Assert in goroutines (use Check instead),
and we should make sure that the goroutine has completed
by the time the test ends.

How about testing the scenario that will actually happen in practice
(ensureIndexes(false) followed by sync()), adding a bunch of stuff to the
database, and ramping up the concurrency quite a bit (say 5-10 concurrent
goroutines)?

Then run the test and see if you get reasonable coverage of the ensureIndexes
method.