Move Libgit2-heavy algorithms into Libgit2.hs