Free Git objects via finalizers or manually

Provide a manual way of freeing objects, but set finalizers for them
in case the user does not want to worry about memory management, which
would be useful for commits or trees, which sare typically small.

When the objects are freed manually, the finalizer is unset to avoid
double-freeing, mimicking what the go runtime does.
Merge pull request #3 from carlosmn/finalizers

Free Git objects via finalizers or manually