Replace semaphores with an atomic ready flag when used without multithreading enabled. Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>