[tests] Add network_thread_ functions and use them in tests
Summary:
Add network thread_start(), network_thread_running() and
network_thread_join() utility functions in mininode.py
Update the tests to use them.
Partial backport of core PR11849
commits 5fc6e71 and 74e64f2
Depends on D2370
Test Plan:
./test/functional/test_runner.py --extended
Reviewers: #bitcoin_abc, deadalnix, jasonbcox
Reviewed By: #bitcoin_abc, jasonbcox
Subscribers: jasonbcox, teamcity, schancel
Differential Revision: https://reviews.bitcoinabc.org/D2383