Explaining Gender Gaps and Racial Divides in Partisanship