Polynomial collocation methods for1D integral equations with nonsmooth solutions