Critical behavior of the Higgs- and Goldstone-mass gaps for the two-dimensional S=1 XY model