mv the raw pointer {swap,replace}_ptr to std::ptr
ptr: replace unnecessary unsafe code
fix tutorial lint warnings
auto merge of #6862 : thestinger/rust/swap, r=bstrie

I don't like the `util` module in general, and `ptr` is a much better place for these.