remote: download HEAD when no refspecs are given

The correct behaviour when a remote has no refspecs (e.g. a URL from the
command-line) is to download the remote's HEAD. Let's do that.

This fixes #1261.
remote: give up after 256 failures to find a common object

This avoids sending our whole history bit by bit to the remote in cases
where there is no common history, just to give up in the end.

The number comes from the canonical implementation.
remote: create FETCH_HEAD with a refspecless remote

When downloading the default branch due to lack of refspecs, we still
need to write out FETCH_HEAD with the tip we downloaded, unfortunately
with a format that doesn't match what we already have.
remote: store dwimed refspecs separately

This allows us to add e.g. "HEAD" as a refspec when none are given
without overwriting the user's data.
remote: don't allow such direct access to the refspecs

Removing arbitrary refspecs makes things more complex to reason
about. Instead, let the user set the fetch and push refspec list to
whatever they want it to be.
remote: make _ls return the list directly

The callback-based method of listing remote references dates back to the
beginning of the network code's lifetime, when we didn't know any
better.

We need to keep the list around for update_tips() after disconnect() so
let's make use of this to simply give the user a pointer to the array so
they can write straightforward code instead of having to go through a
callback.
remote: fix a couple of leaks
remote: let's at least pretend to have some memory safety

Copy the pointers into temporary vectors instead of assigning them tot
he same array so we don't mess up with someone else's memory by
accident (e.g. by sorting).
tests: update push tests

These tests were forgotten when modifying git_remote_ls().
Merge pull request #1914 from libgit2/cmn/fetch-default-head

Remote revamp (refspecless, _ls)