Fix more init bugs.
Summary:
This is a follow-on to #10758 to help move 10758 along. The first fixes
a regression in master that was partially fixed in 10758, the second I'm
not sure if its a regression or not, but its clearly a bug that should
be fixed.
Backport of core PR10919
https://github.com/bitcoin/bitcoin/pull/10919/files
Note to reviewers:
The change in src/bitcoind.cpp is not backported as it should have
been removed in D2260.
Also some of the changes in src/init.cpp have already been (mistakenly
?) ported in D1910.
Test Plan:
Run with and without debug:
make check test_runner.py # should pass without debug, and start but fail on some tests with debug enabled
Reviewers: #bitcoin_abc, deadalnix
Reviewed By: #bitcoin_abc, deadalnix
Differential Revision: https://reviews.bitcoinabc.org/D3050