Stars and reionization: the cross-correlation of the 21 cm line and the near-infrared background