add gitattributes and fix whitespace issues
auto merge of #6230 : thestinger/rust/whitespace, r=catamorphism

I just had `git apply` fix most of them and then did a quick skim over the diff to fix a few cases where it did the wrong thing (mostly replacing tabs with 4 spaces, when someone's editor had them at 8 spaces).