[ms-cxxabi] Factor out some loops into helpers for readability

No functionality change, covered by the existing virtual base adjustment
tests.