[master] Implements a secondary compressed cache (L2 cache)

Author: avf

Summary:
This revision implements compressed and encoded second-level cache with off-heap
(and optionally on-heap) storage and a bucket-allocator based on HBASE-7404.

BucketCache from HBASE-7404 is extensively modified to:

* Only handle byte arrays (i.e., no more serialization/deserialization within)
* Remove persistence support for the time being
* Keep an  index of hfilename to blocks for efficient eviction on close

A new interface (L2Cache) is introduced in order to separate it from the current
implementation. The L2 cache is then integrated into the classes that handle
reading from and writing to HFiles to allow cache-on-write as well as
cache-on-read. Metrics for the L2 cache are integrated into RegionServerMetrics
much in the same fashion as metrics for the existing (L2) BlockCache.

Additionally, CacheConfig class is re-refactored to configure the L2 cache,
replace multile constructors with a Builder, as well as replace static methods
for instantiating the caches with abstract factories (with singleton
implementations for both the existing LruBlockCache and the newly introduced
BucketCache based L2 cache)

Test Plan:
1) Additional unit tests
2) Stress test on a single devserver
3) Test on a single-node in shadow cluster
4) Test on a whole shadow cluster

Revert Plan:

Reviewers: liyintang, aaiyer, rshroff, manukranthk, adela

Reviewed By: liyintang

CC: gqchen, hbase-eng@

Differential Revision: https://phabricator.fb.com/D837264

Task ID: 2325295

git-svn-id: https://svn.apache.org/repos/asf/hbase/branches/0.89-fb@1492797 13f79535-47bb-0310-9956-ffa450edef68