which party has a first elected smaller than 1878, and a district of south carolina 3?
democratic