restore auto-detection of text files

We force the usage of LF line endings, but *only* in text files.
auto merge of #9371 : thestinger/rust/text, r=pnkfelix

We force the usage of LF line endings, but *only* in text files.