Fix uninitialized g_connman crash in Shutdown()
Summary:
Under some circumstances if an error occurs at init, a segfault is
raised at shutdown.
Backport of core PR11326
Test Plan:
./src/bitcoind -wallet=/tmp/wallet.dat (the file should not exist)
Check that an error is shown and:
- before the patch, the app gets a segfault
- after the patch, the app shuts down properly
Reviewers: #bitcoin_abc, deadalnix
Reviewed By: #bitcoin_abc, deadalnix
Subscribers: teamcity, schancel
Differential Revision: https://reviews.bitcoinabc.org/D2392