Align git_signature_dup.

This changes git_signature_dup to actually honor oom conditions raised by
the call to git__strdup. It also aligns it with the error code return
pattern used everywhere else.
Align git_tree_entry_dup.
Merge pull request #2047 from arthurschreiber/arthur/fix-dup-functions

Align `*_dup` functions