[AOTInductor] Improve validation for C++ wrapper codegen (#111102)
It's a reimplementation of #111089
1. When using fake inputs make sure they are on the same device as the original inputs.
2. Don't change the value of self.cpp_wrapper from True to False if can't generate a C++ wrapper, instead have a check and fail early to avoid producing Python code for C++ compiler.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/111102
Approved by: https://github.com/desertfire, https://github.com/jgong5, https://github.com/chunyuan-w