[CMake] Re-enable LIBCXX_HARDENING_MODE for assert build (#182383)
Previously in #68541, the change disabled LIBCXX_HARDENING_MODE for all
non-bootstrapping assert build to fix bootstrapping issues. CMake
variable `LIBCXX_HARDENING_MODE` is only affective in libcxx build to
set a default harderning mode. That means unless the build is
bootstrapped from the newly built libcxx, the harderning mode is not
enabled for assert built compiler, thus the compiler loses test coverage
like accessing the value from an empty std::optional.
The fix is to correctly define `_LIBCPP_HARDENING_MODE` in a way that
respect user defined LIBCXX_HARDENING_MODE. To be extra safe, compile
and test the defined marco will not cause error before using it.