On the algebraic formulation of collective models. I. The mass quadrupole collective model