PR description:
Originally a follow-up to #19364, this simplifies the logic in ProcessOrphanTx() and removes unused variables.
This is a backport of core#19498 [1/5]
https://github.com/bitcoin/bitcoin/pull/19498/commits/6e8dd99ef1c147898bd06fee7014afdff6618f18
Note: The removed_txn parameter does not exist in ProcessOrphanTx in Bitcoin ABC. This part of the logic was dropped in D1175, and was already unused by then. It seems to be related to RBF (see following comment). The last commit of this PR only deals with this parameter, so it is not relevant to Bitcoin ABC.