Phylogeny of the Platyhelminthes and the evolution of parasitism