Align `*_dup` functions

This aligns `git_signature_dup` and `git_tree_entry_dup` to with the return-error-code pattern used throughout the library. It also makes `git_signature_dup` propagate any oom errors if raised by the calls to `git__strdup`, instead of silently ignoring those.

Some of the existing calls of `git_signature_dup` ignore any error conditions returned by it, but fixing that should be done in another PR.