San Francisco elects first black female mayor