[Polly] Port PruneUnprofitable to the NewPM.

GitOrigin-RevId: b687fc9122c883f0ce7cf056aa56313ec1671445
6 files changed