Cache fixes

Fixes bugs, including fixes removed from NetworkAtomics (whoops). See individual commit messages.
I yield to your argument re: chpl_task_yield(), heh.

From a style point of view, I'd like to see the fence moved from the bottom to the top of the loop body, and the comment improved to describe the specific problem it solves. Maybe something like "assure loading flags from memory".