Based on #11240 context, adding test coverage for the behavior introduced in #11225 and to the current wallet limitations.
This is the first step towards adding the ability to store multiple transactions with same tx id but different witness data in the wallet. Verifying and testing the current behavior before introducing the new features.
The following cases are covered:
Two p2wpkh spending transactions with the same hash are received: The first one with segwit data stripped, and the second one with segwit data. Result -> the wallet will update the stored tx, saving the witness data.
Two p2wsh multisig spending txes with the same hash but a different witness are received: The first is added to the wallet via the mempool acceptance flow. while the second one, is added to the wallet via the block connection flow.
Result -> the wallet will NOT update the stored transaction. The first received transaction will take precedence over any following-up transaction. Detached to the fact that the original transaction didn't get into a block and the second one did.
Extra Note: Did it on an unit test merely because wanted to review other parts of the sources while was doing it. Could migrate it into a functional test if reviewers wants it as well.