Physical properties of galaxies and their evolution in the VIMOS VLT Deep Survey. I. The evolution of the mass-metallicity relation up to z ~ 0.9