Make both shutdown() and spin() only return after both the read and event loops have been broken
Invert debug_printf DEBUG cflag logic to match the makefile's