Allow git_remote_ls after disconnecting from the remote

Keep the data around until free, as expected by our own fetch example
remote: don't try to update FETCH_HEAD if no extra heads exist

Don't try to update anything if there are no heads to update. This
saves us from trying to look into a fetch refspec when there is none.

A better fix for compatibility with git when using remotes without
refspecs is still needed, but this stops us from segfaulting.
Merge pull request #1470 from carlosmn/remote-ls-after-close

Fetch fixes