[STM] Better protection for cur_id
[STM] Better protection for cur_id

Since some state handling refactoring, `purify_stm` was no longer
protecting against assignement of cur_id, resulting in confusing
behavior w.r.t. cache.

SkySkimmer/coq,JasonGross/coq,gares/coq,ppedrot/coq,gares/coq,silene/coq,silene/coq,maximedenes/coq,ppedrot/coq,Matafou/coq,silene/coq,Zimmi48/coq,ejgallego/coq,Zimmi48/coq,Zimmi48/coq,gares/coq,ejgallego/coq,SkySkimmer/coq,SkySkimmer/coq,maximedenes/coq,maximedenes/coq,maximedenes/coq,Matafou/coq,JasonGross/coq,maximedenes/coq,ejgallego/coq,Matafou/coq,Zimmi48/coq,coq/coq,JasonGross/coq,SkySkimmer/coq,ppedrot/coq,ppedrot/coq,coq/coq,ejgallego/coq,gares/coq,JasonGross/coq,ppedrot/coq,coq/coq,coq/coq,gares/coq