cmake: unset all cxx flags before testing cxx_atomics
so we are immune to the flags set by the flags set by user. please
note, neither CFLAGS nor CXXFLAGS is populated to the
`check_cxx_source_compiles()` function. so this change is not related
to LTO optimization which is implemented using `_lto_cflags`, which
is added to CFLAGS and CXXFLAGS, as part of `__global_compiler_flags`.