Better handling for msvc env when compiling cpp extensions (#38862)
Summary:
Fixes https://github.com/pytorch/pytorch/issues/38861#issuecomment-631934636.
1. Error out if msvc env is activated but `DISTUTILS_USE_SDK` is not set.
2. Attempt to activate msvc env before running ninja build
Pull Request resolved: https://github.com/pytorch/pytorch/pull/38862
Differential Revision: D21686343
Pulled By: ezyang
fbshipit-source-id: 38b366654e2d0376dbdd21276689772b78e9718e