IterBytes for IpAddr and SocketAddr
Update comment in contravariant test

The previous definition was actually describing covariance.
Fixing to describe contravariance while keeping 'static in the definition was tricky so just changed to use 'short and 'long.
auto merge of #12149 : thomaslee/rust/ipaddr_deriving_iter_bytes, r=cmr

This is a fairly trivial (but IMHO handy) change to implement IterBytes for IpAddr and SocketAddr.

I originally stumbled across this because I wanted to use a SocketAddr as a HashMap key and discovered that I couldn't do it directly. Had to impl IterBytes on a new intermediate type to work around it.
auto merge of #12150 : jakerr/rust/patch-1, r=pnkfelix

The current comment actually describes *co*-variance.
Fixing this to describe contravariance while keeping 'static in the definition was tricky so just changed to use 'short and 'long.

I found the typo in my attempt to understand the concept of variance itself and the comment confused me. I mention this to point out that I'm new to the concept so may have still got the definition wrong, so please review with care :)
std -- replaces uses where const borrows would be required
remove antiquated reflect test rather than bring it up to date
libglob -- patch closure where const borrow would have helped
container -- update example to contain scope of closure borrow
to_str -- update to contain scope of closure
ty -- minor refactorings, helper methods
trans/datum -- move mutable variable into closure
error_reporting -- explain reborrowed upvar constraints in a hopefully useful way
metadata -- remove tiny convenience closure that was causing conflicting mutable borrows
resolve -- rewrite conflict closure into method
syntax/ext/format -- rewrite conflicting closures into methods
syntax/fold -- remove conflicting (and rather pointless) closures
vec -- introduce local var to make clear what subportion is being borrowed
back/link -- introduce block to clarify scope of closure
ppaux -- add Repr implementations
io -- introduce local to avoid conflicting borrow