[MTA] Skip size-0 tensors in `multi_tensor_apply` (#94655)
This PR skips size-0 tensors to avoid possible stack corruption in `multi_tensor_apply()`. A follow-up PR will add more unit tests in `test_foreach.py`.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/94655
Approved by: https://github.com/ngimel