New measurements of the energy spectra of high-energy cosmic-ray protons and helium nuclei with the calorimeter in the PAMELA experiment