Foreach Binary Test Refactor (#59907)
Summary:
Related: https://github.com/pytorch/pytorch/issues/58833
## Changes I'm a bit concerned
- binary ops with one tensorlist and one scalarlist support complex dtypes. To realize this, I added a specialization of [`TensorListScalarListMetadata<c10::complex<double>, 1>` ](https://github.com/pytorch/pytorch/pull/59907/files#diff-131eb9b310905b15b3528da6a23e542a3a3aa952bc88f7423c98a23a8a28cca1R49). This might be out of the scope of this pull request.
cc ptrblck ngimel mcarilli
Pull Request resolved: https://github.com/pytorch/pytorch/pull/59907
Reviewed By: mruberry
Differential Revision: D29551001
Pulled By: ngimel
fbshipit-source-id: 46b25fdba85dd4d6332a77b27376fe96cd422384