zephyr: enable MULTITHREADING by default except on nRF

CONFIG_MULTITHREADING is generally assumed to be y by the zephyr
kernel, even though that's not reflected in the Kconfig. For example,
semaphores depend on it being y, but CMake will still build sem.c even
if it's n.

The sensible default for this option is thus y.

However, it's a size advantage to disable it if the platform drivers
are all aware of this option, such as nRF.

Let's re-work our use of this option to keep it disabled when we know
it's safe, but enable it by default so more platforms can be expected
to work out of the box.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
diff --git a/boot/zephyr/Kconfig b/boot/zephyr/Kconfig
index feead57..e5a388e 100644
--- a/boot/zephyr/Kconfig
+++ b/boot/zephyr/Kconfig
@@ -271,4 +271,15 @@
 
 comment "Zephyr configuration options"
 
+# Disabling MULTITHREADING provides a code size advantage, but
+# it requires peripheral drivers (particularly a flash driver)
+# that works properly with the option enabled.
+#
+# If you know for sure that your hardware will work, you can default
+# it to n here. Otherwise, having it on by default makes the most
+# hardware work.
+config MULTITHREADING
+	default n if SOC_FAMILY_NRF
+	default y
+
 source "$ZEPHYR_BASE/Kconfig.zephyr"