Bugfix: submitblock: Use a temporary CValidationState to determine accurately the outcome of ProcessBlock

Fixes #5083 (based on #5105)
@TheBlueMatt developers refer to this file to make constants in, for example, Python or other language bindings for the different error codes. Having codes change name suddenly may be confusing, so I'm in favour of documenting it in some way (I don't care if this is done with aliases, or just a comment, but I'm fine with the current way).