Add .gitattributes

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

Reference #1228.