critpath.py: Refactor main execution path
This avoids doing all the main execution stuff at global scope,
and splits out argument parsing to make the new main() function
a bit smaller. We also use argparse's built-in ability to set
mutually-exclusive arguments instead of reinventing it.
Signed-off-by: Adam Williamson <awilliam@redhat.com>