A distorted-wave study for core-excitation processes in CO by electron impact