The helper create_block offers two parameters version and txlist which set the nVersion field / extend the vtx array of the block, respectively. By taking use of those, we can remove a lot of code, including the recalculation of the merkle root. Both passing txs in string and CTransaction format is supported, i.e. we also save potential calls to tx_from_hex.
The PR also contains another commit which replaces magic numbers for OP_TRUE/OP_1 (0x51) with the proper constant from the script module.
Instances setting the block version of 4 explicitely after calling create_block are removed, as this is the default since #16333 got merged (see #23521 (review)).