Structure and nature of the low-temperature phase transition in M3H(XO4)2-type crystals with a zero-dimensional H-bond network