How did federal policies undertaken during the Civil War transform the United States into a stronger nation-state—economically, politically, and ideologically?