Oid: make sure not to dereference a NULL git_oid

Some calls like Reference.Target() can return NULL if the reference is
symbolic. Make sure newOidFromC() can handle these situations.
Merge pull request #9 from carlosmn/nil-oid

Oid: make sure not to dereference a NULL git_oid