Backport 2.0.1 AAE improvements

This is a prerequisite for the backporting of a number of MDC
improvements done in the 2.0.X series to prepare a 1.4.11 release.
This version passes the AAE riak_test.

The original changes come from PRs against both riak_core and riak_kv.
But on the 1.4 branch, the hashtree module is still in riak_kv, so they are
both included here.

https://github.com/basho/riak_core/pull/629
https://github.com/basho/riak_kv/pull/1026

/cc @jonmeredith