[VPlan] Use map_range with CastTo for cast-only range loops (NFC). (#244713)
Replace loops of the form
for (VPRecipeBase &R : VPBB->phis()) {
auto *PhiR = cast<VPPhi>(&R);
with
for (VPPhi &PhiR : map_range(VPBB->phis(), CastTo<VPPhi>)) {
and similarly for loops over users, so the cast is part of the range.
Also use the existing VPBlockUtils::blocksAs where applicable, and
make_isa_range instead of hand-written filter + cast combinations.
This is slightly more explicit and more compact.