librustc: Introduce a new visitor type based on traits

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