Quench dynamics of spin in quantum dots coupled to spin-polarized leads