Variational Analysis of Functions of the Roots of Polynomials