How did the construction of railroads in the mid-1800s impact the development of major American cities and ports?