Core: Make fetch phase nested doc aware

By letting the fetch phase understand the nested docs structure we can serve nested docs as hits.
The `top_hits` aggregation can because of this commit be placed in a `nested` or `reverse_nested` aggregation.

Closes #7164
Tests: add verbosity to this test case
add verbose logging during index close
MLT Query: don't fetch unnecessary stats
Fix serialization of short[] arays.

short[] were mistakenly encoded as a float[]. This is not an issue for the
text-based xcontents that we have (yaml, json) since floats can represent any
short value and are serialized as strings. However, this will make the binary
xcontents serialize shorts as int instead of floats.

Close #7845
Tests: dump all thread stacks on failure
[SPEC] Separated the "Upgrade Index" API into two methods

* `get_upgrade` => `GET _upgrade`  -- Return the status
* `upgrade`     => `POST _upgrade` -- Perform the operation

Original specification part of c021f22523a69583b94c56921792b727ab4030fb.

Related: #7884, #7922
Tests: move thread stacks on failure to a RunListener, so it actually works
Aggregations: Fixes scripted metrics aggregation when used as a sub aggregation

The scripted metric aggregation is now a PER_BUCKET aggregation so that parent buckets are evaluated independently. Also the params and reduceParams are copied for each instance of the aggregator (each parent bucket) so modifications to the values are kept only within the scope of its parent bucket

Closes #8036
Docs: Remove the note that fielddata doesn't support filtering.

This particular note was about fielddata filtering but could cause confusion
that fields that have doc values enabled cannot be used for filtering (as in
a `filtered_query`).
[CORE] Log if CircuitBreaker is tripping

Today we only throw an exception which might not be logged at all. This
commit adds debug logging if we are tripping a CB.

Closes #8050
Spec: Added human flag to indices.get_upgrade
Add link to new upgrade docs from indices page.

See #7922.
Add forgotten include for upgrade docs.

See #7922
[TEST] bump benchmark apis version to 2.0.0