Ensure pending merges are updated on segment flushes

Due to the default of `async_merge` to `true` we never run
the merge policy on a segment flush which prevented the
pending merges from being updated and that caused actual
pending merges not to contribute to the merge decision.

This commit also removes the `index.async.merge` setting is actually
misleading since we take care of merges not being excecuted on the
indexing threads  on a different level (the merge scheduler) since 1.1.

This commit also adds an additional check when to run a refresh
since soely relying on the dirty flag might leave merges un-refreshed
which can cause search slowdowns and higher memory consumption.

Closes #5779
[TEST] Improve performance of MockBigArray MockPageRecycler
[Test] should be abstract
[TEST] use a real upperbound for the check on the time spend during suggestions
[TEST] Fix ClusterStatsTests#testValuesSmokeScreen to wait for yellow to get reliable FS stats.
[DOCS] update old status of plugins
Don't lookup version for auto generated id and create
When a create document is executed, and its an auto generated id (based on UUID), we know that the document will not exists in the index, so there is no need to try and lookup the version from the index.
For many cases, like logging, where ids are auto generated, this can improve the indexing performance, specifically for lightweight documents where analysis is not a big part of the execution.
Revert "Don't lookup version for auto generated id and create"

This reverts commit dc734984541537dc93ddae4633ad69898bdb6959.
[TEST] Use indexRandom in ShardSizeTests.
Make Releasable extend AutoCloseable.

Java7's AutoCloseable allows to manage resources more nicely using
try-with-resources statements. Since the semantics of our Releasable interface
are very close to a Closeable, let's switch to it.

Close #5689
Improved SearchContext.addReleasable.

For resources that have their life time effectively defined by the search
context they are attached to, it is convenient to use the search context to
schedule the release of such resources.

This commit changes aggregations to use this mechanism and also introduces
a `Lifetime` object that can be used to define how long the object should
live:
 - COLLECTION: if the object only needs to live during collection time and is
   what SearchContext.addReleasable would have chosen before this change
   (used for p/c queries),
 - SEARCH_PHASE for resources that only need to live during the current search
   phase (DFS, QUERY or FETCH),
 - SEARCH_CONTEXT for resources that need to live until the context is
   destroyed.

Aggregators are currently registed with SEARCH_CONTEXT. The reason is that when
using the DFS_QUERY_THEN_FETCH search type, they are allocated during the DFS
phase but only used during the QUERY phase. However we should fix it in order
to only allocate them during the QUERY phase and use SEARCH_PHASE as a life
time.

Close #5703
Upgrade to Lucene 4.7.2
Check for no open issues before build release
Prevent fsync from creating 0-byte files

This is related to LUCENE-5570 where fsync creates a 0-byte file
if the file does not exists. This commit adds the patched lucene
version using Java 7 APIs as well as a note to replace this method
with the upcomeing IOUtils#fsync in Lucene 4.8

This commit cleans up FsImmutableBlobContainer#writeBlob to make
use of Java7 Auto-Closing features and ensures that the directory
the blob was written to is fsynced as well if possible.
Remove unused FileSystemUtils#copyFile
[BUILD] remove leftover print statement
Separate persistent and global metadata serialization settings
Benchmark documentation

Moving benchmark documentation under the search section.

Closes #5786
Fix snapshot status with empty repository

The snapshot status command with empty repository should return current status of currently running snapshots in all repositories.

Fixes #5790
Separate benchmark API endpoints

Separates benchmark API endpoints into separate files according to API
funtionality. This makes it easier for our tests and clients.

Closes #5787