In a next commit, when `g_avalanche` is removed, the PeerManager ctor and `LoadChainstate` will need a reference or a pointer to m_node.avalanche. Moving it beforehand makes the following commit less huge. This will make a bunch of `if (g_avalanche) { ... }` unecessary in the `PeerManagerImpl`, but they will be removed when avalanche is actually a reference/
Note that `LoadChainstate` is still called before the processor is initialized, so we still hit some nullptr in `if (g_avalanche) { ... }` tests in the validation code. The plan is to give the active chainstate a pointer to the processor, but not immediately via the constructor, a bit later. This will preserve the current behavior of not having avalanche initialized immediately in the chainstate loading code.
I tried initializing Avalanche even earlier in the init code, so it can later be passed down via `LoadChainstate` to the `Chainstate` constructors, but this causes some test failures in two functional tests, presumably races because the avalanche event loop starts too early.