An alternating direction method of multipliers with a worst-case O(1/n2) convergence rate