Redo command-line interface in click

This change re-implements the command-line in click, a more modern CLI library, and consolidates use of JSON as the patch format. Pretty printed JSON with `--style=pretty` is presented as an alternative to YAML for a more readable patch.