Use git_odb_object_data/_size whereever possible

This uses the odb object accessors so we can change the internals
more easily...
Merge pull request #1461 from arrbee/new-cache

Use git_odb_object_data/_size whereever possible