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.
Fix rejection of parent dir of negated ignores

While scanning through a directory hierarchy, this prevents a
positive ignore match on a parent directory from blocking the scan
of a directory when a negative match rule exists for files inside
the directory.
status: failing test with slash-star

When writing 'bin/*' in the rules, this means we ignore very file inside
bin/ individually, but do not ignore the directory itself. Thus the
status listing should list both files under bin/, one untracked and one
ignored.
For negative matches, always use leading dir match
Demonstrate a trailing slash failure.

`git help ignore` has this to say about trailing slashes:

> If the pattern ends with a slash, it is removed for the purpose of
> the following description, but it would only find a match with a
> directory. In other words, foo/ will match a directory foo and
> paths underneath it, but will not match a regular file or a
> symbolic link foo (this is consistent with the way how pathspec
> works in general in Git).

Sure enough, having manually performed the same steps as this test,
`git status` tells us the following:

	# On branch master
	#
	# Initial commit
	#
	# Changes to be committed:
	#   (use "git rm --cached <file>..." to unstage)
	#
	#	new file:   force.txt
	#
	# Untracked files:
	#   (use "git add <file>..." to include in what will be committed)
	#
	#	../.gitignore
	#	child1/
	#	child2/

i.e. neither child1 nor child2 is ignored.
Allow NULL error message prefix when class=GITERR_OS
Merge pull request #2513 from ethomson/giterr_null_msg

Allow NULL error message prefix when class=GITERR_OS
Don't include the unreadable tests on win32
Merge pull request #2517 from ethomson/no_win_unreadable

Don't include the unreadable tests on win32
Custom transport: minor cleanups

 * Move the transport registration mechanisms into a new header under
   'sys/' because this is advanced stuff.
 * Remove the 'priority' argument from the registration as it adds
   unnecessary complexity.  (Since transports cannot decline to operate,
   only the highest priority transport is ever executed.)  Users who
   require per-priority transports can implement that in their custom
   transport themselves.
 * Simplify registration further by taking a scheme (eg "http") instead
   of a prefix (eg "http://").
Merge pull request #2469 from ethomson/transport2

Custom transport: minor cleanups
Don't run the ssh clone tests against http remotes