Restructure riak_context to ease unit testing