add magit-decode-git-path

... and use it to undo the following in some places.

(There might be some other places that could benefit from this.  Or
maybe there are event better places to do this instead, to avoid doing
it repeatedly.)

https://github.com/git/git/blob/master/quote.c

Quoting man:git-config "core.quotepath":

The commands that output paths (e.g.  ls-files, diff), when not given
the -z option, will quote "unusual" characters in the pathname by
enclosing the pathname in a double-quote pair and with backslashes the
same way strings in C source code are quoted. If this variable is set
to false, the bytes higher than 0x80 are not quoted but output as
verbatim. Note that double quote, backslash and control characters are
always quoted without -z regardless of the setting of this variable.

Thanks to Nicolas Richard for investigating this issue.  #581, #840.
Partially revert "magit-git{,k}-executable: store full path, not just name"

This partially reverts commit 99b89109f5058cea8c60f28951d044afe7e95efa.

Using the full path to the git executable running git remotely fails
if it isn't installed in the same location locally and remotely.

Thanks to Piers Cawley for reporting.
Merge pull request #850 from tarsius/decode-filename

add magit-decode-git-path
Merge pull request #854 from vanicat/t/resurect-stagged-files

Resurrect the staged version of a file
Simpler version of magit-decode-git-path

Given that emacs can read strings, there is no need for the manual
decoding introduced by commit 68b3317.
Merge pull request #858 from YoungFrog/simpler-decode-filename

Simpler version of magit-decode-git-path
Add --track option to branching
remove magit-run, add magit-run-{stgit,topgit}

Remove `magit-run'.  It isn't used by any known external library.

Within Magit it was used by `magit-stgit.el' and `magit-topgit.el'.
Add `magit-run-stgit' and `magit-run-topgit' as replacements.  Note
that the later has slightly different semantics than the former and
`magit-run-git'.  Remove the unnecessary explicit `t' return values
of some callers `magit-run*' and by extension `magit-run-top' already
return `t' or raise an error.
magit-stgit.el: remove colons at end of section headings

Of course keep the required colon after "Commentary" and "Code".
Also rename section "Customizables" to "Options".
magit.el: rearrange "Git Processes" section

Move the "api" functions (`magit-run-git{-*} to the top, even before
`magit-run*'.  Also change the order within this group of functions.

Move some boring functions that were previously defined first to the
very bottom instead.
magit-run*: use command's basename as process name

Previously the full path to the executable was used (provided
the command was actually passed to `magit-run*' as full path).
always use ".git/magit-bisect-run" as the bisect script

Previously a temporary file was used and the variable
`magit--bisect-tmp-file' was necessary to remember its location.
define magit--bisect-last-pos as a permanent local variable
rewrite func `magit-ref-get-label-color'
add new face `magit-log-head-label-head'
enable to display HEAD label in magit-log
magit-insert-staged-changes: do more work here

Do more work inside `magit-insert-staged-changes' instead of requiring
the callers (*currently* only `magit-refresh-status') to pass in some
values.
magit-insert-status-line: declare indentation rules
add magit-insert-status-head-line
replace global magit-process-client-buffer with local variable

Instead of setting `magit-process-client-buffer' globally pass the
buffer that was current when `magit-run*' was called to the functions
that need to know about its value.  These are the process sentinels.

Because process sentinels take exactly two arguments we create a partial
application of `magit-process-sentinel' (and `magit--bisect-run-sentinel')
and use the returned function as actual sentinel.

Also limit the use of the global variable `magit-process-buffer-name',
rename some of `magit-run*'s internal variables and change were these
variables are set.