librustc: Introduce a new visitor type based on traits and port syntax to it.

This is preparation for removing `@fn`.

This does *not* use default methods yet, because I don't know
whether they work. If they do, a forthcoming PR will use them.

This also changes the precedence of `as`.
librustc: Disallow "unsafe" for external functions
auto merge of #8235 : pcwalton/rust/unsafe-extern-fns, r=brson

r? @brson