[TEST] added exception for GET index API to bwc tests
Internal: refactor copy headers mechanism to not require a client factory

With #7594 we replaced the static `BaseRestHandler#addUsefulHeaders` by introducing the `RestClientFactory` that can be injected and used to register the relevant headers. To simplify things, we can now register relevant headers through the `RestController` and remove the `RestClientFactory` that was just introduced.

Closes #7675
[TEST] parse response body as json depending on the content-type in our REST tests
[API] Fix minor issues with indices.get definition and tests

mark index param as required
make body match json, not string containing json
Test: Let both types have a non_analyzed id field.
[DOCS] clarification of breaking changes to 1.4 due to GET index API
[TEST] Use a real unique clustername for InternalTestClusterTests
Spec: Fixed the docs URL for indices.get and indices.exists
Changed dev-tools/es_release_notes to:
* remove markdown support
* prefer PRs over issues
* include related issues in the list
* always use section headers if there is a header
[STORE] Improve exception from Store.failIfCorrupted

If you have previously corrupted files, this method currently builds an
exception like:
```
    failed engine [corrupted preexisting index]
    failed to start shard
```

Followed by a CorruptIndexException. This commit writes the entire
stacktrace to provide additional information. It also changes the
failure message from `corrupted preexisting index` to `preexisting
corrupted index` to prevent confusion.

Closes #7596
Aggregations top_hits: Fixed inconsistent sorting of the hits

In the reduce logic of the top_hits aggregation if the first shard result to process contained has no results then the merging of all the shard results can go wrong resulting in an incorrect sorted hits.
This bug can only manifest with a sort other than score.

Closes #7697
More Like This API: remove unused search_query_hint parameter

Closes #7691
[TEST] Use a sorted set since sets are compared and compare is order specific
[TEST] fix another rounding issue
[STORE] Turn unexpected exception into CorruptedIndexException

Today if we run into exception like NumberFormatException or IAE
when we try to open a commit point to retrieve checksums and calculate
store metadata we just bubble them up. Yet, those are very likely index
corruptions. In such a case we should really mark the shard as
corrupted.
[Version] Add Version 1.4.0-Beta
[VERSION] Added Version [1.5.0]
[CORE] Ensure GroupShardsIterator is consistent across requests

GroupShardsIterator is used in many places like the search execution
to determin which shards to query. This can hold shards of one index
as well as shards of multiple indices. The iteration order is used
to assigne a per-request shard ID for each shard that is used as a
tie-breaker when scores are the same. Today the iteration order is
soely depending on the HashMap iteration order which is undefined or
rather implementation dependent. This causes search requests to return
inconsistent results across requests if for instance different nodes
are coordinating the requests.

Simple queries like `match_all` may return results in arbitrary order
if pagination is used or may even return different results for the same
request even though there hasn't been a refresh call and preferences are
used.
Update update.asciidoc

The upserts section should be on the same page as updates.
Tests: add an awaitFix to IndicesLifecycleListenerTests