Message-Passing Algorithms for Quadratic Minimization