[VPlan] Generalize header-phi detection in VPPhi::execute. (NFC) (#189352)
Generalize the header-phi detection in VPPhi::execute to use VPDT.
This is currently NFC, but is needed to use VPPhi also for dissolving
replicate regions (https://github.com/llvm/llvm-project/pull/186252).
Split off from approved https://github.com/llvm/llvm-project/pull/186252
as suggested.
PR: https://github.com/llvm/llvm-project/pull/189352