[riak-cli] - Refactor code for outputing format.