California voters will advance two candidates for governor to the November election in the most unsettled gubernatorial race in recent memory, concluding a long and winding primary campaign in which Democrats struggled to pick a new leader for the nation’s most populous blue state.