Update libgit2 binaries to 7940036

https://github.com/libgit2/libgit2/compare/bd67979...7940036
Teach Checkout() to cope with revparse extended syntax leading to references
Ensure there is a self cleaning directory to remove