Json

Note: not necessarily indending to push this to zfsonlinux.  Creating a pull request seems to be the only way of leaving code review comments?  Let me know if I'm using github wrong.
It would probably be easier to follow if you just created a new function, json_dataset() which is analogous to print_dataset() but is called when cb_json is set.