drivers: flash: nrf: Avoid locking when not threaded
drivers: flash: nrf: Avoid locking when not threaded

When using CONFIG_MULTITHREADING=n, the semaphore primitives are
non-functional and useless. Remove their usage when this option is
enabled.

Signed-off-by: Carles Cufi <853081dc8dca4fe6a7e3c984752718b5db36e060@nordicsemi.no>

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