librustc: Change fold to use traits instead of `@fn`.
auto merge of #8864 : pcwalton/rust/traitify-fold, r=brson

r? @brson