Ensure libgit2 always uses STDCALL convention
Remove ".dll" extension from dll-name declaration
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