First-order least-squares method for the obstacle problem