Segmental nitrogen doping and carboxyl functionalization of multi‐walled carbon nanotubes