This PR fixes inconsistent behavior for encoding/decoding small integers in Script discovered when working on #29221.
OP_1NEGATE is the minimally encoded version of the number -1 in Script. All other minimally encoded small integers (OP_0, OP_1,...,OP_16) are handled correctly by DecodeOP_N() and EncodeOP_N().
This PR extends this functionality to handling OP_1NEGATE in the same way we treat other small integers in Script.
We treat all small integers consistently in EvalScript() - so we should treat their encoding and decoding helper functions consistently as well. It doesn't make sense to handle OP_1NEGATE separately imo.
This is useful for future extensions of the Script language - such as 64bit arithmetic. If this change isn't accepted, we need to adhoc handle OP_1NEGATE separately from other small integers when encoding/decoding OP_1NEGATE.