Specializing in Cities: Density and the Pattern of Trade