ssh: detect authentication methods

Before calling the credentials callback, ask the sever which
authentication methods it supports and report that to the user, instead
of simply reporting everything that the transport supports.

In case of an error, we do fall back to listing all of them.
ssh: propagate the error code from the auth callback

We need to be able to get a GIT_EUSER back through the outermost call.
Introduce GIT_EAUTH

Introduce this error code to signal an authentication failure.
ssh: request credentials again on authentication failure

Instead of completely giving up on the first failure, ask for
credentials as long as we fail to authenticate.
cred: introduce username-only cred

This exists as ssh needs to know about the username to use before it can
query for the supported authentication methods.
cred: add convenience function to get the username

Since each cred defines the username on their own, introduce
git_cred__username to retrieve the username pointer from them.
ssh: make sure to ask for a username and use the same one

In order to know which authentication methods are supported/allowed by
the ssh server, we need to send a NONE auth request, which needs a
username associated with it.

Most ssh server implementations do not allow switching the username
between authentication attempts, which means we cannot use a dummy
username and then switch. There are two ways around this.

The first is to use a different connection, which an earlier commit
implements, but this increases how long it takes to get set up, and
without knowing the right username, we cannot guarantee that the
list we get in response is the right one.

The second is what's implemented here: if there is no username specified
in the url, ask for it first. We can then ask for the list of auth
methods and use the user's credentials in the same connection.
ssh: adjust clone and push test credentials to the split user+pass method

For urls where we do not specify a username, we must handle the case
where the ssh transport asks us for the username.

Test also that switching username fails.
travis: enable password authentication on OSX

Our ssh tests assume that the server supports password authentication
in a few places. This is convenient as we're not testing authentication
methods, but what happens around them.

Tell sshd on OSX to accept this form of authentication.
Set timeout on remote (WinHTTP) to infinite #2147
Allow to override default ssh transport_cb

W/o this patch it is not possible to have a third party ssh transport_cb if GIT_SSH is disabled or a third party transport_cb which has a higher priority than the default one.

Signed-off-by: Sven Strickroth <email@cs-ware.de>
Set timeout on remote (WinHTTP) should return error in case of failure. Connection timeout set to 1 minute. Read/Write timeout remains set to infinite #2147
Merge remote-tracking branch 'upstream/master' into cmn/ssh-retry
Add ssh retry changes to CHANGELOG
Merge branch 'cmn/ssh-retry'
Adjust clone tests to USERNAME cred type
Added some tests

Signed-off-by: Sven Strickroth <email@cs-ware.de>
winhttp: Prevent swallowing of url parsing error
Merge pull request #2490 from csware/ssh-wintunnel

Allow to override default ssh transport_cb - in order to allow third party ssh transports
Merge pull request #2502 from rnowosielski/remote_set_timeout

Set timeout on remote (Add timeout for WinHttpReceiveResponse #2147)