The Gilded Age titans did more than build railroads. They paved the way for the reinvention of the stock market—and the creation of runaway wealth.