Improve the Result returned by the Upgrade() library function by:
Changing the boolean status to an enum status because there are four distinct success/failure cases
Add a field for patch reversal conflicts, coming in a future PR
Add the ability for a command to return an exit code other than 0 or 1. This is important because when an upgrade fails, I want to indicate why in the status code. This allows automation to detect what went wrong without resorting to parsing error messages.
Use this feature to return 2 for merge conflicts and 3 for patch reversal conflicts.