Add C++ torch::nn::functional::pdist (#27122)
Summary:
Adds `torch::nn::functional::pdist` module support for the C++ API.
Issue: https://github.com/pytorch/pytorch/issues/25883, https://github.com/pytorch/pytorch/issues/27082
Reviewer: yf225
Pull Request resolved: https://github.com/pytorch/pytorch/pull/27122
Differential Revision: D17685823
Pulled By: yf225
fbshipit-source-id: f8ceb09635385ef2e16a002e5fc255be8eb2ebf4