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'd really hope to have some concurrent logic here to test that the locks do actually work when several clients are contesting over them.