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 that using this inline function is better than just doing
the obvious:

    // Update the document version
    if d.Found {
       err = si.PutDocumentVersion(".versions", "version", si.Index, d.Version, v)
    } else {
       err = si.CreateDocument(".versions", "version", si.Index, v)
    }
    if errgo.Cause(err) == elasticsearch.ErrConflict {
        // ...
        return nil
    }
    if err != nil {
    }