[DOCS] Added backwards compatibility instructions to Perl client
Add IndexReader reference counting methods to forbidden APIs.
Be paranoid about double release.
Use patched version of ReferenceManager to prevent infinite loop in
RefrenceManager#accquire()

See LUCENE-5436
[DOCS] delete by query requires a top-level query parameter

Closes #5044
(cherry picked from commit 1e265b3)
Fix BytesRef owning issue in string terms aggregations.

The byte[] array that was used to store the term was owned by the BytesRefHash
which is used to compute counts. However, the BytesRefHash is released at some
point and its content may be recycled.

MockPageCacheRecycler has been improved to expose this issue (putting random
content into the arrays upon release).

Number of documents/terms have been increased in RandomTests to make sure page
recycling occurs.

Close #5021
Make size=0 return all buckets for the geohash_grid aggregation.

Close #4875
fixed trace logging hidden by check for isDebugEnabled
Extend ElasticsearchLuceneTestCase rather than LuceneTestCase

LuceneTestCase misses some thread filters that might fail a test
since a background cluster is still running from a previous test.
Upgrading analysis plugins fails

When an analysis plugins provides default index settings using `PreBuiltAnalyzerProviderFactory`,  `PreBuiltTokenFilterFactoryFactory` or `PreBuiltTokenizerFactoryFactory` it fails when upgrading it with elasticsearch superior or equal to 0.90.5.

Related issue: #4936

Fix is needed in core. But, in the meantime, analysis plugins developers can fix that issue by overloading default prebuilt factories.

For example:

```java
public class StempelAnalyzerProviderFactory extends PreBuiltAnalyzerProviderFactory {

    private final PreBuiltAnalyzerProvider analyzerProvider;

    public StempelAnalyzerProviderFactory(String name, AnalyzerScope scope, Analyzer analyzer) {
        super(name, scope, analyzer);
        analyzerProvider = new PreBuiltAnalyzerProvider(name, scope, analyzer);
    }

    @Override
    public AnalyzerProvider create(String name, Settings settings) {
        return analyzerProvider;
    }

    public Analyzer analyzer() {
        return analyzerProvider.get();
    }
}
```

And instead of:

```java
    @Inject
    public PolishIndicesAnalysis(Settings settings, IndicesAnalysisService indicesAnalysisService) {
        super(settings);
        indicesAnalysisService.analyzerProviderFactories().put("polish", new PreBuiltAnalyzerProviderFactory("polish", AnalyzerScope.INDICES, new PolishAnalyzer(Lucene.ANALYZER_VERSION)));
    }
```

do

```java
    @Inject
    public PolishIndicesAnalysis(Settings settings, IndicesAnalysisService indicesAnalysisService) {
        super(settings);
        indicesAnalysisService.analyzerProviderFactories().put("polish", new StempelAnalyzerProviderFactory("polish", AnalyzerScope.INDICES, new PolishAnalyzer(Lucene.ANALYZER_VERSION)));
    }
```

Closes #5030
s/\t/    /
[TEST] run REST tests against multiple nodes (round-robin)

Multiple nodes are now started when running REST tests against the `TestCluster` (default randomized settings are now used instead of the hardcoded `1`)

Added also randomized round-robin based on all available nodes, and ability to provide multiple addresses when running tests against an external cluster to have the same behaviour
[TEST] removed leftover delete alias test in delete mapping
[TEST] slightly sped up warmer tests by providing warmers during index creation
[TEST] disabled refresh for get_source realtime test
Add a aggregation test that uses `doc.score` to make sure we don't forget to set the Scorer.
Log warning in case of double release of the IndexSearcher instead of throwing an exception.
[TEST] Added cat.allocation and cat.aliases tests
[TESTS] Fixed cat.allocation tests to work with one node cluster
[TESTS] Make cat.allocation tests handle different disk sizes