Interstellar absorption lines toward NGC 2264 and AFGL 2591 - Abundances of H2, H3(+), and CO