Infrared chemiluminescence of CO and CO2 produced by molecular-beam surface reactions