merge base: Correctly raise an error if a non-commit object is passed.

`git_merge__bases_many` should correctly raise an error if a non-commit object is passed in the list of ancestors. See https://github.com/libgit2/rugged/pull/404 for context.

//cc @carlosmn @vmg