High energy pA collisions in the color glass condensate approach I: gluon production and the Cronin effect