[DOCS] Various aggregation doc fixes
For unicast zen discovery don't overwrite a ping response for a node if the previous ping response has a set master and the current response hasn't.

Per single main ping request we maintain the received ping response per node. Each node level ping response is mapped into that. If from a previous node level ping request the response has already been set for a node, it will be overwritten. We give higher value to the latest response. This change makes sure that this doesn't happen if the previous response has a set master and the current response hasn't a set master. Otherwise a node will lose the fact that another node has elected itself as master, the result of that would be that there would multiple master nodes in a single cluster.

Closes #5413
[TESTS] Added AwaitsFix
Invoke postCollection on aggregation collectors.
Also cleanup how facet and aggs collector are used inside the QueryCollector

Closes #5387
ContextSuggester
================

This commit extends the `CompletionSuggester` by context
informations. In example such a context informations can
be a simple string representing a category reducing the
suggestions in order to this category.

Three base implementations of these context informations
have been setup in this commit.

- a Category Context
- a Geo Context

All the mapping for these context informations are
specified within a context field in the completion
field that should use this kind of information.
[TEST] Randomized number of replicas used for indices created during tests

Introduced two levels of randomization for the number of replicas when running tests:

1) through the existing random index template, which now sets a random number of replicas that can either be 0 or 1 that is shared across all the indices created in the same test method unless overwritten

2)  through createIndex and prepareCreate methods, between 0 and the number of data nodes available, similar to what happens using the indexSettings method, which changes for every createIndex or prepareCreate unless overwritten (overwrites index template for what concerns the number of replicas)

Added the following facilities to deal with the random number of replicas:

- made it possible to retrieve how many data nodes are available in the `TestCluster`
- added common methods similar to indexSettings, to be used in combination with createIndex and prepareCreate method and explicitly control the second level of randomization: numberOfReplicas, minimumNumberOfReplicas and maximumNumberOfReplicas

Tests that specified the number of replicas have been reviewed:
- removed manual replicas randomization where present, replaced with ordinary one that's now available
- adapted tests that didn't need a specific number of replicas to the new random behaviour
- also done some more cleanup, used common methods like assertAcked, ensureGreen, refresh, flush and refreshAndFlush where possible
Allow edit distances > 2 on FuzzyLikeThisQuery

Due to a regression edit distances > 2 threw exceptions after unifying
the fuzziness factor in Elasticsearch `1.0`. This commit brings back the
expceted behavior.

Closes #5292
Make aggregations CacheRecycler-free.

Aggregations were still using CacheRecycler on the reduce phase. They are now
using page-based recycling for both the aggregation phase and the reduce phase.

Close #4929
Remove AggregationContext.cacheRecycler().
Cardinality aggregation.

This aggregation computes unique term counts using the hyperloglog++ algorithm
which uses linear counting to estimate low cardinalities and hyperloglog on
higher cardinalities.

Since this algorithm works on hashes, it is useful for high-cardinality fields
to store the hash of values directly in the index, which is the purpose of
the new `murmur3` field type. This is less necessary on low-cardinality
string fields because the aggregator is smart enough to only compute the hash
once per unique value per segment thanks to ordinals, or on numeric fields
since hashing them is very fast.

Close #5426
Added static analysis profile to pom.xml

Added pmd, findbug as well as site generation logic to top pom.xml file
Created customized pmd ruleset
[TEST] Add mapping to use an actual stopword analyzer

This test was added when the default  analyzer was filtering stopwords. But since
1.0 the default analyzer doesn't filter stopwords
[TEST] Stabelize ConcurrentPercolatorTests after # shard randomization
[TEST] Rewrite SearchStatsTests to not shut down nodes after indexing.

The test was shutting down nodes even if some of the inidces had only a
single shard. This caused that we basically had no shard active that
could sever the docs and caused random failures. This commit fixed the
test to rather allocate enough shards such that we never need to resize
the cluster which also makes the test faster.
Add retry mechanism to get snapshot method

During snapshot finalization the snapshot file is getting overwritten. If we try to read the snapshot file at this moment we can get back an empty or incomplete snapshot. This change adds a retry mechanism in case of such failure.
[TESTS] Specify unicast hosts and transport port range specifically
The p/c queries must always be wrapped in a CustomQueryWrappingFilter in fquery parser.
Also made assertions more descriptive when failing.
[Test] Strengthen SimpleIndicesWarmerTests.testEagerLoading.
Disabled query size estimation in percolator, because this is too expensive cpu wise.
Lucene's RamUsageEstimator.sizeOf(Object) is to expensive.
Query size estimation will be enabled when a cheaper way of query size estimation can be found.

Closes #5372
Relates to #5339
Significant_terms aggregation identifies terms that are significant rather than merely popular in a set.
Significance is related to the changes in document frequency observed between everyday use in the corpus and
frequency observed in the result set. The asciidocs include extensive details on the applications of this feature.

Closes #5146