Absolutely monotonic functions and connection coefficients for polynomials