FCTX_ATTR_SHUTTINGDOWN needs to be set and tested while holding the node
lock but the rest of the attributes don't as they are task locked. Making
fctx->attributes atomic allows both behaviours without races.
(cherry picked from commit 912ce874)
Closes #1412 (closed)
This will create a new commit in order to revert the existing changes.