lib: cbprintf: improved %p specifier handling
lib: cbprintf: improved %p specifier handling

This fixes an issue where the %p specifier always generated "(nil)"
on SPARC. The failing test cases were:
 tests/lib/sprintf/libraries.libc.sprintf
 tests/kernel/common/kernel.common.misra
 tests/kernel/common/kernel.common.tls
 tests/kernel/common/kernel.common

The exact logic behind the issue has not been fully analyzed, but
it can be observed that this commit eliminates one occurrence of
undefined behavior. (Only allowed to read the last union field written.)

Signed-off-by: Martin Åberg <37424e7fbe3f8590d57db5ed6ae5b8866742b6be@gaisler.com>

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