Fix the cpp_extension testing cleanup util so that it works even if there is no rm from git for windows on path while keeping the ability to navigate around windows `permission error: [WinError 5]` via an on error mechanism provided by `shutils.rmtree`.
Fixes: https://github.com/intel/torch-xpu-ops/issues/4273.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/189857
Approved by: https://github.com/BBBela, https://github.com/AKloniecki, https://github.com/etaf, https://github.com/guangyey, https://github.com/jansel