make sure files are saved with consistent line ending

if end_of_line is set, apply it
if end_of_line is not set, replicate line ending of the first line
based on PR from Scott Bilas https://github.com/editorconfig/editorconfig-visualstudio/pull/15