Add .gitattributes

Setting text=auto will ensure line endings to be normalized to LF.
This prevents changed files on different systems after cloning the
project.

Reference #1228.
Closes #1231.
Merge pull request #1231 from drublic/gitattributes

Add .gitattributes