AvalancheState is really a container for various Avalanche statistics rather than the entire state. Decoupling the pubkey from this makes sense. I made it optional to make it clear that not all nodes must have an Avalanche pubkey.
Future patches will refactor and rename AvalancheState.