Heights and preperiodic points of polynomials over function fields