assumevalid.py, example_test.py and p2p-acceptblocks.py add
p2p_connections after the NetworkThread has been started. This isn't
permitted. Fix test to restart the network thread when adding new
connections.
p2p-leaktest.py had a potential race condition if the NetworkThread
hadn't terminated by the time we tried to restart it.