How did the compromise of 1877 affect reconstruction in the united states? what were the terms of the compromise?