Physics and applications of nanotubes