This patch intends to be a non-functional change. It changes the
type of BudgetRemaining and Cost in costAndCollectOperands from 'int' to
'unsigned' so that the algorithm checks beforehand whether the resulting
budget is going to be exceeded or invalidated, rather than relying on
BudgetRemaining to end up < 0.
This refactoring is a preparation for InstructionCost added in D91174, which
has an Invalid state. By checking the 'invalidated' case early, InstructionCost
can be a drop-in replacement for unsigned when D91174 lands.