Revert "Revert D20885968: [pytorch][PR] Enable backtrace with MSVC" (#36205)
Summary:
This reverts commit 8afa001d898914a48d6b9e3d944a99607d2819c1 and made a few improvements including the following items.
1. return `std::string` for `get_module_base_name`
2. eliminate `module should always be true` warning
3. do `SymInitialize` and `SymCleanup` once to save time
Pull Request resolved: https://github.com/pytorch/pytorch/pull/36205
Reviewed By: malfet
Differential Revision: D20919672
Pulled By: ezyang
fbshipit-source-id: 0063a478779feb106459af48063485ef676008a5