Don't try to run check-index in MockDirectoryWrapper

if the MockDirWrapper checks the index on close it closes all
closeables that is has to crash the index if something is not flushed yet.
For us this is a problem since the input is still used. We need to fix this in
lucene first.
More common AcknowledgedRestResponseActionListener

Introduced use of AcknowledgedRestResponseActionListener in put/delete index template
Page-based cache recycling.

Here is an attempt to refactor cache recycling so that it only caches large
arrays (pages) that can later be used to build more complex data-structures
such as hash tables.

Summary of the commit:
 - CacheRecycler now has the ability to cache byte[], int[], long[], double[]
   or Object[] arrays using 4MB of memory at most per thread.
 - Paged arrays in o.e.common.util can now optionally take a CacheRecycler to
   reuse existing pages.
 - All aggregators' data-structures now use CacheRecycler:
   - for all arrays
   - LongHash can now take a CacheRecycler
   - there is a new BytesRefHash (inspired from Lucene but quite different,
     still; for instance it cheats on BytesRef comparisons by using Unsafe)
     that also takes a CacheRecycler