Fix for MKL detection script on Windows (#32970)
Summary:
Fixes https://github.com/pytorch/pytorch/issues/32914.
1. Use `DEFINED ENV{MKLProductDir}` instead of `$ENV{MKLProductDir}`
2. Cache `INTEL_COMPILER_DIR` and `INTEL_MKL_DIR`
Pull Request resolved: https://github.com/pytorch/pytorch/pull/32970
Differential Revision: D19727677
Pulled By: soumith
fbshipit-source-id: 065c6bee35a2295f1c478df1460cad7668b25af5