Move capability from riak_core to riak_kv, minor cleanup.