Inequalities for ultraspherical polynomials and application to quadrature