Loop in futex_wait() on EAGAIN

futex_wait() sometimes errors out with an EAGAIN, so we need to loop to make
sure that the futex_wait() call actually blocks to simplify application code.
Remove newly unused temporary variable
Add API call to get main thread stack info

This function must be called while running on the main thread stack, otherwise
the values returned are undefined.
Use swap instead of CAS for wait-free list removal
Support removing all nodes with a certain value from a WFL
Add wfl_foreach_unsafe macro.

It is "unsafe" with respect to removals, but not inserts.