[RFC] Convert FOR_ALL_WINDOWS to use a locally declared pointer

This code was weird: `wp` would never be `NULL` as the value of the iterator is at least `firstwin`. Not sure what to do here.