Fixup to #14978, which introduced a bunch of unused enum values, such as UNKNOWN_ERROR, ERROR_COUNT and TRANSACTION_ERR_LAST. None of those have a meaning in the context of an enum class, where the compiler can infer if all cases have been covered in a switch-case.
Also, move the global ::maxTxFee back to the rpc caller, so it can be set on a per call basis (in the future).
---
This is a backport of Core PR15408