Both tests mempool_packages.py and mempool_package_onemore.py define a utility function chain_transaction with a similar implementation. This PR deduplicates it by moving it into the util package and keeping the more general properties:
- pass a list of parent_txids/vouts instead of single values
- always mark the BIP125-replaceable flag for txs, created via
createrawtransaction(this is needed by themempool_package_onemore.pytest, but doesn't hurt the other one)
This is a low-hanging fruit; as a potential follow-up one could probably also deduplicate the function chain_transaction in rpc_packages.py, which looks a bit different, as it also takes the parent locking script into account and doesn't send the tx.