Cleanup the public API: the caller shouldn't depend on libgit2

* Unexport implementation details
* Remove dead code

Signed-off-by: Solomon Hykes <solomon@docker.com>
Fix typo, thanks Erik

Signed-off-by: Solomon Hykes <solomon@docker.com>
Reported-by: Erik Hollensbe <erik@docker.com>