librustc: Only emit visitor glue if it's necessary.

500K to 600K shaved off librustc.
auto merge of #6744 : pcwalton/rust/visitor-glue, r=graydon

r? @graydon