Add a .gitattributes file

Hopefully this will reduce merge problems when people on Windows
machines edit text files. (Seems to happen with strings.xml files.)

Enable java-specific diff comments.