Remove AtomicFlag

fixes #12943
auto merge of #12951 : cadencemarseille/rust/issue-12943-remove-AtomicFlag, r=alexcrichton

fixes #12943