fix various dialyzer warnings
re-instated vclock sort
Merge pull request #327 from basho/refactor/jra/dialyzer-fixes

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