Study of the inclusive production of charged pions, kaons, and protons in pp collisions at sqrt(s) = 0.9, 2.76, and 7 TeV