The visible and near-infrared spectra of asteroids in cometary orbits