pg_upgrade: Improve invalid option handling
Currently, calling pg_upgrade with an invalid command-line option
aborts pg_upgrade but leaves a pg_upgrade_internal.log file lying
around. Reorder things a bit so that that file is not created until
all the options have been parsed.
Discussion: https://www.postgresql.org/message-id/
24c8bd05-aed1-6301-919d-
8acbabdb8c24@2ndquadrant.com