Homogenization of the nonlinear Maxwell model of viscoelasticity and of the Prandtl-Reuss model of elastoplasticity