Fix inconsistent line endings and add missing xml comments

I added the missing xml comments and added .gitattributes for LF normalization.