The generalized Toda lattices and the Whitham averaged system for the defocusing nonlinear Schrodinger equation