Dialyzer fixes (do not merge until riak_core 539 is merged)

Along with @reiddraper's PR in the parent branch, removes the rest of the dialyzer warnings.

Depends on:
https://github.com/basho/yokozuna/pull/325
https://github.com/basho/riak_core/pull/539