8294: remove sorting from polyroots
avoid using roots(multiple=True) if possible
don't make assumptions about roots in DiracDelta

It's better to return a Piecewise than to make a simplification
that may not be valid.