Docs, specs, to and from binary funs

Merge back the counters that made there way to riak_kv and
were changed there.