After the defeat of the Confederacy, federal forces remained in Charleston during the city's reconstruction. Which side was defeated in the war before Reconstruction