kernel: alert: Declare tracing variables only when needed.
kernel: alert: Declare tracing variables only when needed.

The tracing variable in alert.c was declared by default. This
should have been declared only when CONFIG_OBJECT_TRACING is set.

Signed-off-by: Adithya Baglody <06b44f6fa9a97a2b955c2d2cd070279967447860@intel.com>

finikorg/zephyr,punitvara/zephyr,finikorg/zephyr,Vudentz/zephyr,ldts/zephyr,GiulianoFranchetto/zephyr,explora26/zephyr,finikorg/zephyr,nashif/zephyr,nashif/zephyr,galak/zephyr,zephyrproject-rtos/zephyr,galak/zephyr,Vudentz/zephyr,galak/zephyr,punitvara/zephyr,zephyrproject-rtos/zephyr,Vudentz/zephyr,zephyrproject-rtos/zephyr,galak/zephyr,explora26/zephyr,ldts/zephyr,zephyrproject-rtos/zephyr,explora26/zephyr,finikorg/zephyr,GiulianoFranchetto/zephyr,Vudentz/zephyr,GiulianoFranchetto/zephyr,ldts/zephyr,punitvara/zephyr,explora26/zephyr,explora26/zephyr,Vudentz/zephyr,ldts/zephyr,punitvara/zephyr,punitvara/zephyr,ldts/zephyr,nashif/zephyr,nashif/zephyr,Vudentz/zephyr,galak/zephyr,nashif/zephyr,GiulianoFranchetto/zephyr,finikorg/zephyr,zephyrproject-rtos/zephyr,GiulianoFranchetto/zephyr