Evidence for metal-semiconductor transitions in twisted and collapsed double-walled carbon nanotubes by scanning tunneling microscopy.