Fix a potential memory leak in the new `Commit#amend`.

`rugged_object_get` raises an exception in case the given object is
neitther a
`Rugged::Object` nor a String, and that will leak the memory of
`committer`
and/or `author`.