merge: expose multiple merge bases

We always calculate multiple merge bases, but up to now we had only
exposed the "best" merge base.

Introduce git_oidarray which analogously to git_strarray lets us return
multiple ids.
remote: restrict default branch to branches namespace
travis: no need to clean out the test repository

This was added to avoid the remote's default branch to be considered to
the be notes one which the first network test leaves behind.
remote: assert what we want to happen when ther is no default branch

Assert what we already do, so as to notice changes.
remote: short-circuit the default branch check if there is none

If we do not have a HEAD ref in the heads, we already know there is no
default branch. Return immedately.
clone: support remotes with references but no branches

A repository can have any number of references which we're not
interested in such as notes or tags. For the default branch calculation
we only care about branches. Make the decision about the number of
branches rather than the number of refs in general.
Merge pull request #2481 from libgit2/cmn/oidarray

merge: expose multiple merge bases
MSVC does not support zero size array
Merge pull request #2544 from linquize/test-push

MSVC does not support zero size array
transport: distinguish between unknown and unsupported transports

Even when built without a SSH support, we know about this transport. It
is implemented, but the current code makes us return an error message
saying it's not.

This is a leftover from the initial implementation of the transports
when there were in fact transports we knew about but were not
implemented.

Instead, let the SSH transport itself say it cannot run, the same as we
do for HTTPS.
transport: return ENOTFOUND for HTTPS and SSH when they're not supported

The previous commit makes it harder to figure out if the library was
built with support for a particular transport. Roll back some of the
changes and remove ssh:// and https:// from the list if we're being
built without support for them.
remote: get rid of git_remote_valid_url()

It does the same as git_remote_supported_url() but has a name which
implies we'd check the URL for correctness while we're simply looking at
the scheme and looking it up in our lists.

While here, fix up the tests so we check all the combination of what's
supported.
remote: test for supported URLs in a single place

Instead of using ifdefs to run the tests, use them to set when we expect
to support a particular scheme and always have the tests in the code.
Skip SSH clone tests if libgit2 not built with GIT_SSH defined
Fix warning
Merge pull request #2548 from linquize/warning5

Fix warning
remote: add tests for remote-branch edge cases

Add tests for the case when there are no branches on the remote and when
HEAD is detached but has the id of a non-branch. In both of these cases,
we should return ENOTFOUND.
remote: add test for single-branch clone

When cloning, we may be asking for a particular branch or subset of
branches. Make sure we test for that.
clone: correct handling of an unborn HEAD

If the remote does not advertise HEAD, then it is unborn and we cannot
checkout that branch. Handle it the same way as an empty repo.
clone: handle overly restrictive refspecs

When the fetch refspec does not include the remote's default branch, it
indicates an error in user expectations or programmer error. Error out
in that case.

This lets us get rid of the dummy refspec which can never work as its
zeroed out. In the cases where we did not find a default branch, we set
HEAD detached immediately, which lets us refactor the "normal" path,
removing `found_branch`.