Conditional Independence of 1D Gibbs States with Applications to Efficient Learning