Move create_malleated_version() from p2p_orphan_handling.py to test_framework/messages.py so that it can be reused by other tests.
This is part of #29415 Broadcast own transactions only via short-lived Tor or I2P connections. Putting it in its own PR to reduce the size of #29415 and because it does not depend on the other commits from there.