tracing: fixes C++ compilation issue
tracing: fixes C++ compilation issue

When tracing_cpu_stats.h is included by C++ file it will not compile
and link correctly due to missing #ifdef __cplusplus directives
in the header file.

Fixes #23072

Signed-off-by: Dariusz Lisik <289333a87f7ba9a2f5ab8cf785bd8d952fc5eca7@hidglobal.com>

galak/zephyr,nashif/zephyr,zephyrproject-rtos/zephyr,finikorg/zephyr,nashif/zephyr,zephyrproject-rtos/zephyr,zephyrproject-rtos/zephyr,finikorg/zephyr,galak/zephyr,nashif/zephyr,finikorg/zephyr,Vudentz/zephyr,zephyrproject-rtos/zephyr,Vudentz/zephyr,galak/zephyr,nashif/zephyr,galak/zephyr,Vudentz/zephyr,Vudentz/zephyr,finikorg/zephyr,Vudentz/zephyr,finikorg/zephyr,zephyrproject-rtos/zephyr,nashif/zephyr,galak/zephyr,Vudentz/zephyr