How did the invention of the cotton gin impact the economy of the southern United States during the 19th century?