Update libgit2 source code (31e752b)

* Update libgit2 to commit
  31e752b6546537bbeee89b6d2f3027cf0eff9a53 from 2014-09-09

* patches/winhttp-build-with-mingw-w64.patch: Update

Signed-off-by: Stefan Widgren <stefan.widgren@gmail.com>
Fix ahead-behind tests

* The ahead-behind logic is fixed in libgit2. It was reversed.

Signed-off-by: Stefan Widgren <stefan.widgren@gmail.com>