Excitation of nitrogen and carbon monoxide ionic emissions by He(2 3S), He+, and He+2