[cli/engine/command:generate_output] catch SystemExit and use its exit code
[cli/engine/command:generate_output] more robustly handle exceptions in output generators
[cli/commands/python_repl] the base PythonReplCommand.main() is not a generator function; make preamble modification work
[cli/engine/command:generate_output] apparently SystemExit.code can be a non-number type
[cli/engine/command:generate_output] handle TypeErrors when parsing StopIteration arguments