Celestial reference frames and the gauge freedom in the post-Newtonian mechanics of the Earth–Moon system