Add sanity checks for NCCL detection.
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/22819
Test Plan: Imported from OSS
Differential Revision: D16281714
Pulled By: ezyang
fbshipit-source-id: 396bcbf099bd07b996cf779c6b43092096b52d90