Rust update: Remove proc and implementation of AnyRefExt for static NetworkStream

* `proc()` has been replaced with `move ||`, or sometimes `move|:|` ([#19338](https://github.com/rust-lang/rust/pull/19338))
* It looks like `self.get_type_id() == TypeId::of::<T>()` requires a static `NetworkStream`. I'm not sure about the source of this or if it's a good solution... What do you think?

I'm submitting this in advance, even if the tests will fail to compile due to the `curl` dependency. I tried to fix that one too, but it would just give me poetry and I ran out of time for today.