Close files on file diff failure

Not closing the files on a diff failure ensures that clar
cleanup will fail on win32 because we still have the file open.
Tests for core.autocrlf and .gitattributes
Tests for crlf filtering into the repository
core.autocrlf=input w/ text=auto attr to workdir
Merge pull request #2110 from libgit2/ed/crlf_input

Handle `core.autocrlf=input` when checking out
Never convert CRLF->LF

Core git performs no conversion on systems that use LF, emulate that.
Merge pull request #2114 from ethomson/crlf_redux

Never convert CRLF->LF
Fix filter test for CRLF->LF issues
Merge pull request #2115 from ethomson/crlf_redux

Fix filter test for CRLF->LF issues