Gap inequalities for the max-cut problem: a cutting-plane algorithm