Revert "add foreach support for custom device (#102047)"
This reverts commit b088ff467794bc1125133fb0428749d5bcd6ae3a.
Reverted https://github.com/pytorch/pytorch/pull/102047 on behalf of https://github.com/malfet due to Broke inductor, see https://hud.pytorch.org/pytorch/pytorch/commit/b088ff467794bc1125133fb0428749d5bcd6ae3a ([comment](https://github.com/pytorch/pytorch/pull/102047#issuecomment-1572368942))