Do not use --depth=1 if the server does not support it, fixes #744

If a clone with --depth=1 fails, we retry without it.

Also, there are some git servers that do not support trailing .git, like RhodeCode.
Trailing .git was removed from the GitRemoteResolver and added to the GitHub resolver.
The point of having a trailing git was to normalise the sources and cache entries.

Test cases added and adjusted.