Message-Passing Algorithms for Quadratic Programming Formulations of MAP Estimation