Massively Parallel List-Ranking and Tree-Rooting