Fast numerical computation of quasi-periodic equilibrium states in 1D statistical mechanics, including twist maps