Add git_merge_bases_many.
Extract shared functionality.
Merge pull request #2604 from arthurschreiber/arthur/add-merge-bases-many

Add `git_merge_bases_many`