Hopf-Galois objects and cogroupoids