added a comment.
added missing #include statement.
reimplemented foundation::AbortSwitch using an atomic variable.
fixed race condition introduced in 8e9b1d1d7b3eee5bb99cefef0b9b8f782c28233c: foundation::JobQueue::signal_event() must acquire the mutex.
small optimization.