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 <mikael.lixenstrand@erlang-solutions.com>
Rebased-by:  Joseph Blomstedt <joe@basho.com>
Change AAE key estimation to sample 1% of segments

This commit makes the AAE-based key count estimation sample up to
1% of the number of AAE segments in a tree, rather than the previous
hardcoded limit of 10000 segments.

While 10000 segments does correspond to 1% of the segments using default
AAE settings, the hardcoded limit is incorrect when non-default settings
are used. This commit makes things consistent regardless of the settings.

Authored-by: Kresten Krab Thorup <krab@trifork.com>
Rebased-by:  Joseph Blomstedt <joe@basho.com>
Fix function arity in hashtree:local_compare/2
Simplify hashtree:estimate_keys/3

This commit combines the two terminating conditions for estimate_keys
into a single guard expression, simplifying the code.
Document hashtree:estimate_keys/1
remove unnecessary +1
Fixes sibling explosion bug caused by forwarding coordination requests during
handoff

Forward port of this issue from 1.4 to 2.0:
https://github.com/basho/riak_kv/issues/1046

Original fix is:
https://github.com/basho/riak_core/commit/76cbdc24daa74e7976c6e15d48c1bfedde294183

There is a matching PR for riak_kv
Merge pull request #672 from basho/bug/gg/gh1046-forwardport

Fixes sibling explosion bug caused by forwarding coordination requests d...

Reviewed-by: seancribbs
Merge pull request #633 from basho/feature/aae-estimate-keys

Implement key count estimation via AAE trees

Reviewed-by: engelsanchez
Merge branch '2.0' into integration/riak-admin-handoff-team

Conflicts:
	src/riak_core_vnode.erl
Post-2.0 merge cleanup after review of changes.