Measurement of galactic cosmic-ray deuteron spectrum in the PAMELA experiment