[PyTorch] Avoid string construction from const char* and speedup empty string creation if error messages are suppressed (#65939)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/65939
This change includes 2 separate optimizations.
1. Provide an overload of `debugString(const char*, ...)` in addition to `debugString(std::string, ...)` for cases where `const char*` is passed in to avoid `std::string` construction in cases where `STRIP_ERROR_MESSAGES` is also defined and the caller is passing in a `const char*`
2. Return `std::string("", 0)` instead of `""` since the former triggers no call to `std::basic_string`'s constructor whereas the latter does. [Godbolt Link](https://godbolt.org/z/oTExed5h8). However, I'm surprosed by this since the man page for [std::basic_string](https://en.cppreference.com/w/cpp/string/basic_string/basic_string) clearly states that the constexpr overload is since C++20, and I am building using `-Os -std=c++17`
Godbolt Screenshot:
{F667311023}
ghstack-source-id: 139507542
Test Plan:
CI and local build via:
```
buck build //xplat/caffe2/fb/lite_predictor:lite_predictor
```
Reviewed By: swolchok
Differential Revision: D31312942
fbshipit-source-id: aa24abbfe1c16419f235d037595321982614c5ea