Add some impls of Show (RefCell, Weak, some resolve types)

r? @huonw or @alexcrichton

Apparently, we have previously rejected an RFC like this. However, since then we removed `{:?}` and so without this debugging gets really difficult as soon as there is a RefCell anywhere, so I believe there is more benefit to adding these impls than there was before. By using "try_borrow" we can avoid panicing in `Show` (I think).

@ huon in response to a comment in #19254: I noticed that `drop()` checks for the ptr being null, so I checked here too. Now I am checking for both, if you're confident I can change to only checking `strong()`.


In particular, while the RFC does state that `Weak` should have an implementation for `Show`, it might be better to just print something like `(still valid Weak)`. As the RFC says, "implementations of the `Show` trait are expected to never `panic!` and always
produce valid UTF-8 data," and an infinite loop does not satisfy this.

An alternative to this would be using some global variable (`thread_local` is in `std`, unfortunately) to keep track of recursion depth and printing some special message if that gets too high.