Time-dependent Gutzwiller theory of magnetic excitations in the Hubbard model