Docs: fixed a typo in the docs

Closes: #6718
Docs: Update histogram-aggregation.asciidoc

filter in a filtered query should be under "filter" key

Closes #6738
Allow primaries that have never been allocated to be allocated if under the low watermark

Fixes #6196
[Relocation] process pending mapping update in phase 2

During phase1 we copy over all lucene segments. These may refer to mapping updates that are still queued up to be sent to master. We must make sure those pending updates are processed before completing the relocation.

Relates to #6648

Closes #6762
Query DSL: Improved explanation for match_phrase_prefix

The match_phrase_prefix provided the same explanation as the match_phrase
query. There was no indication that the last term was run as a prefix
query.

This change marks the last term (or terms if there are multiple terms
in the same position) with a *

Closes #2449
Build: Add all netty classes during shading

In order to have access to all codecs and handlers by netty, they
need to be exposed during shading, otherwise only the classes, which
are used by the built are exposed.
Core: remove per-ID locking when ID was auto-generated

When we know the ID for the document we are about to index was
auto-generated, we don't need to acquire/release the per-ID lock,
which might provide small speedups during highly concurrent indexing.

Closes #6584
Don't update default mapping on phase2 recovery
the default mapping is not merged, but updated in place, and only put mapping API can change it, no need to make sure it has been properly updated on the master. This can cause conflicts when a put mapping for it happens at the same time.
closes #6771
[TEST] wait for green to update mapping
before we update the mapping, make sure the index is green, so a delayed recovery update mapping will not override the mapping itself
Test: Temporarily change delete/put_mapping to wait for green
Delete and update mapping execution order has changed with #6762
[Recovery] only send mapping updates to master if needed

The change added in #6762 helps making sure the pending mapping updates are processed on all nodes to prevent moving shards to nodes which are not yet fully aware of the new mapping. However it introduced a racing condition delete_mapping operations, potentially causing a type to be added after it's deletion. This commit solves this by only sending a mapping update if the mapping source has actually changed.

Closes #6772
[Test] Revert temporary fixes for update mapping on recovery issue

This reverts:
"Test: Temporarily change delete/put_mapping to wait for green": commit e408f8f638c2dd97a3ec86c8a9ac940f43ab37a0.
"[TEST] wait for green to update mapping": commit b3641a2ee6eb23318d49f5f04b39149e70c2b65b.
Store: Before removing shard physically from disk verify that another node in the cluster actually holds an active shard copy.
Applied feedback 1
Check if node is >= 1.3.0, and support shard active internal api, if not then skip
feedback 2
Only deletes shard files if the cluster state version is the same as it was before
rename
added unit tests
In order for a shard to be deleted deleted all nodes with a started shard instance need have acked that the shard being checked exists.