rustc: Improve error messages for resolve failures.
auto merge of #14086 : Ryman/rust/resolve_error_suggestions, r=alexcrichton

Provides better help for the resolve failures inside an `impl` if the name matches:
- a field on the self type
- a method on the self type
- a method on the current trait ref (in a trait impl)

Not handling trait method suggestions if in a regular `impl` (as you can see on line 69 of the test), I believe it is possible though.

Also, provides a better message when `self` fails to resolve due to being a static method.

It's using some unsafe pointers to skip copying the larger structures (which are only used in error conditions); it's likely possible to get it working with lifetimes (all the useful refs should outlive the visitor calls) but I haven't really figured that out for this case. (can switch to copying code if wanted)

Closes #2356.
test: Remove all uses of `~str` from the test suite.
libworkcache: Remove all uses of `~str` from `libworkcache`.
libuuid: Remove all uses of `~str` from `libuuid`.
libhexfloat: Remove all uses of `~str` from `libhexfloat`
libarena: Remove all uses of `~str` from `libarena`
libregex: Remove all uses of `~str` from `libregex`
libgraphviz: Remove all uses of `~str` from `libgraphviz`.
liblog: Remove all uses of `~str` from `liblog`
libglob: Remove all uses of `~str` from `libglob`
libsemver: Remove all uses of `~str` from `libsemver`
libtime: Remove all uses of `~str` from `libtime`
librand: Remove all uses of `~str` from `librand`
libsync: Remove all uses of `~str` from `libsync`
libtest: Remove all uses of `~str` from `libtest`.
libterm: Remove all uses of `~str` from `libterm`
liburl: Remove all uses of `~str` from `liburl`
libcollections: Remove most uses of `~str` from `libcollections`
libnum: Remove all uses of `~str` from `libnum`