SAV Galerkin-Legendre spectral method for the nonlinear Schrödinger-Possion equations