COO intersection: allow external hash + hash reuse in sparse_mask (#94596)
External hash implies more flexibility in the op coverage + performance improvement.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/94596
Approved by: https://github.com/cpuhrsch