Change the order in which code snippets are executed as a result of receiving the VERSION message. Move the snippets that do MakeAndPushMessage() near the end. This makes it easier to interrupt the execution when no messages should be sent as a response to the VERSION messages, in private broadcast connections.
This is a non-functional change.
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.