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.
Streamline url-parsing logic.
Clarify parsing issues and errors
Use http_parser_parse_url to parse urls
Unescape url-encoded usernames and passwords
Compile HTTP parser on win32 (for url parsing)
Fix ssh.c compile
Incorporate feedback
Remove unnecessary check
Make url decoding more bulletproof
Correctly quote config values while saving

If the value contains a command (; or #) char or starts or ends with space it needs to be quoted.

Signed-off-by: Sven Strickroth <email@cs-ware.de>
Add a testcase for values which needs quotes

Signed-off-by: Sven Strickroth <email@cs-ware.de>
allowing create remote with custom fetch spec
Add another testcase to make sure double quotes are correctly escaped

Signed-off-by: Sven Strickroth <email@cs-ware.de>
Add git_packbuilder_hash to query pack filename
adding doc for new param and test to check fetch spec is correctly added
Rename method

Signed-off-by: Sven Strickroth <email@cs-ware.de>