Fetch mappings and settings correctly
Fetch mappings and settings correctly

If an index with the real name of `realname` is dumped via an alias
(say, `aliasname`), the object returned from `GET /aliasname/_mapping`
will have a top level key of `realname` instead of `aliasname`.  This
causes the current code to return a value of `nil` for both the mappings
and settings for such indexes.

Instead, since there is only one top-level key in the response, just
return the value under that key.

Also, strip out the next level of the response, which always has a key
of "mappings" or "settings", since otherwise we get an incorrect value
stored in the index.json file (ie, it starts with
`{"settings":{"settings":{...`)

Finally, raise an error if the response doesn't have the expected
format, so we don't silently fail to dump the settings or mappings.

patientslikeme/es_dump_restore,rboulton/es_dump_restore