Improve Elasticsearch initialization

Improve the way that Elasticsearch is initailized in a couple ways:

- Take the analysis settings from the classes the same way that the
  mappings are taken.

- Merge mappings and analysis into the initial index creation. This
  avoids the need to close and re-open the index for the initial
  analysis settings configuration.

- Re-open the index in a finally clause, to ensure that it is never
  left closed when performing analysis settings updates.

- Detect index already exists error more robustly.