Draft: make fctx_done() idempotent
In some conditions, when rctx_done() is reached while waiting for a validator to complete, fctx_done() can be called twice on the same fetch, which caues a double detach.
this can be mitigated by making fctx_done() idempotent; the fctx->state field is now atomic and if it is already set to fetchstate_done then fctx_done() is a no-op.
Closes #2969 (closed)