TestNode objects need to be removed during shutdown, as setup_nodes does not remove previous TestNode objects from previous test runs during setup.
This is a backport of Core PR17288 [4/7]
https://github.com/bitcoin/bitcoin/pull/17288/commits/614c645643e86c4255b98c663c10f2c227158d4b
Depends on D8243