samples: fix the metairq_dispatch sample failed on acrn_ehl_crb
samples: fix the metairq_dispatch sample failed on acrn_ehl_crb

The samples/kernel/metairq_dispatch runs failed on acrn_ehl_crb
due to the potential race condition in accessing the global stat
data. Add a spinlock to prevent this.

Fixes #40889

Signed-off-by: Enjia Mai <7a2de2448a1c31432e87f79c5f6556ebbe33f656@intel.com>

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