Residual metal impurity aids facile in situ electrochemical surface derivatization of single-walled carbon nanotubes.