The Evolution of Massive Stars. I. Red Supergiants in the Magellanic Clouds