...also update comments to remove mention of ::ChainActive()
From: https://github.com/bitcoin/bitcoin/pull/20750#discussion_r579400663
Also, what about passing a const reference instead of a pointer? I
know this is only theoretical, but previously if the tip was nullptr,
then Height() evaluated to -1, now it evaluates to UB
Note: in Bitcoin ABC, there was already a check for active_chain_tip == nullptr, but only for nMedianPastTime. A few lines above we accessed the pointer to get the nHeight without checking first (potential UB introduced in D11191).
This is a backport of core#21055 [1/16]
https://github.com/bitcoin/bitcoin/pull/21055/commits/9da106be4db692fa5db7b4de79f9cf7bfef37075