Use num of actual threads if busiestThreads is larger

We currently use the number of hot threads that we are
interested in as the value for iterating over the actual
hot threads which can lead to AIOOB is the actual number
of threads is less than the given number.

Closes #4927
Use #ensureSearchable() in GeoHashGridTests
Made all multi-bucket aggs return consistent response format

Closes #4926
Fix potential NPE when no source and no body

In recent changes, we added missing support for `source` parameter in some REST APIs:

* #4892 : mget
* #4900 : mpercolate
* #4901 : msearch
* #4902 : mtermvectors
* #4903 : percolate

```java
        BytesReference content = null;
        if (request.hasContent()) {
            content = request.content();
        } else {
            String source = request.param("source");
            if (source != null) {
                content = new BytesArray(source);
            }
        }
```

It's definitely better to have:

```java
        BytesReference content = request.content();
        if (!request.hasContent()) {
            String source = request.param("source");
            if (source != null) {
                content = new BytesArray(source);
            }
        }
```

That said, it could be nice to have a single method to manage it for various REST actions.

Closes #4924.
Updated URLs to include 1.x and 1.0 snapshots

This file is used by elasticsearch client jerkin projects
Wait for green after indexing doc, so that the mapping update is always after the index operation on replica has completed. (replica shard may needed to catch up)
fixed nested example response in docs

Closes #4935
Improve test stability
Added dedicated thread pool cat api, that can show all thread pool related statistic (size, rejected, queue etc.) for all thread pools (get, search, index etc.)
By default active, rejected and queue thread statistics are included for the index, bulk and search thread pool.
Other thread statistics of other thread pools can be included via the `h` query string parameter.

Closes #4907
Remove waiting for green in CopyToMapperIntegrationTests
[TEST] Fixed whitespace in cluster.state/20_filtering.yaml