Use libgit2 with threads

I compiled libgit2 with thread support and got no crashes so far. I think it could be the time to enable in in our releases.
TSVN did that in the past (with apr_terminate()), but it was not relyable.