moved free functions to riak_messages.h