This adds a test for BIP30 to check that duplicate txs can exist in the blockchain given the first one was completely spent when the second one is added.
Note that some lines modified in the Core PR were moved and deleted on our side (D5060, D6101)
This concludes backport of Core [[https://github.com/bitcoin/bitcoin/pull/16363 | PR16363]]
Commit: fa8489a15511f61a372473927e73c34692bbec23