Update <threads.h> error handling
Yodaify conditions in kernel/threads.c
Add once_flag and call_once()
Update intermediate generation targets in kernel and libc makefiles