Safe wrapper around AtomicPtr.
Instead of swapping a pointer, it works with references and lifetimes, allowing a safe API.
Two versions are provided:
- [
RefSwap][] for swapping references - [
OptionRefSwap][] for swappingOption<&T>
[OptionRefSwap][] encodes None as a null pointer and has no additionnal overhead.