Mechanism of the coupling of diazonium to single-walled carbon nanotubes and its consequences.