Implement key count estimation via AAE trees
Implement key count estimation via AAE trees

This commit adds hashtree:estimate_keys/1 which can be used to estimate
the number of keys in a partition by sampling the segments in the relevant
AAE tree.

The estimation is calculated by computing a keys-per-segment estimate and
then multiplying that estimate by the total number of segments.

The keys-per-segment estimate is determined by traversing over segments
until either 10000 segments have been sampled or 1000 keys have been
seen. With the default AAE settings, 10000 segments correspond to 1% of
the total number of segments.

Authored-by: Mikael Lixenstrand <28eaf9bbf6d4a039cdcbb2d2815fa9cdc521d2aa@erlang-solutions.com>
Rebased-by:  Joseph Blomstedt <16a9a54ddf4259952e3c118c763138e83693d7fd@basho.com>

Kyorai/riak_core