What happened to the hundreds of thousands of men in the Union and Confederate armies after they lay down their arms?.