lib: os: printk: Minor refactoring
lib: os: printk: Minor refactoring

Refactoring to remove code redundancy caused by splitted
handling based on USERSPACE enabled.

Signed-off-by: Krzysztof Chruscinski <9b6dc988558c51b0405b49b55c8e66862969844b@nordicsemi.no>

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