Implement git_odb_foreach

I have not actually tested it, but it builds and should be sufficiently straightforward to just work.

The code is an exact analog of the git_packbuilder_foreach work.

EDIT: Okay, I have tried it now, it appears to work just fine.