How did states and local governments both legally and illegally strip away the rights of African Americans during Reconstruction and beyond?