Concurrency  primitives

Here I dust off and enable unconditional compilation of the concurrency primitives in `os`, `hal`, and `util`. I also add single-threaded fallbacks where appropriate so that we can present a uniform interface regardless of whether multitasking is enabled. Moreover, many of these are useful even in a single-tasking environment due to interrupts.
There's a race condition here