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`.
auto merge of #8163 : pcwalton/rust/new-visitor, r=pcwalton

Does not use default methods yet; a forthcoming PR will convert it over to use default methods.

r? @alexcrichton