rt: remove unused 'rust_compare_and_swap_ptr'. Closes #4836