Controlled Growth of One-Dimensional Metal–Semiconductor and Metal–Carbon Nanotube Heterojunctions