Dispersion relation formalism for virtual Compton scattering and the generalized polarizabilities of the nucleon