The French national railroad company intended to help California build its high-speed rail from San Francisco to Los Angeles, but ended up leaving the state to pursue projects in war-torn North Africa, which the company said was a less “dysfunctional” place.