On the existence of infinitely many stable and unstable invariant tori for systems from Newhouse regions with heteroclinic tangencies