Carbon nanotube–polymer composites for photonic devices