Internal API to use ObjectID directly in place of git_oid*

Adds an internal API to use our ObjectID directly in places where a `git_oid*` is required.

Use like:

```
void foo(const ObjectId& id) {
  git_something( ObjectId2git_oid(id) );
}
```
where `git_something` takes a `git_oid*` as input.