The Effect of Cosmic Rays on Cometary Nuclei. II. Impact on Ice Composition and Structure