magit-highlight-section: avoid shadowing region

When selecting multiple one-line sections (such as commits in logs)
using the region and doing so by going backward, then don't highlight
the current section because that would shadow the region.
magit-cherry-mode: don't mention magit-toggle-section

Don't mention `magit-toggle-section' in doc-string because there
is no section that could be toggled in this mode's buffer.
re-highlight section when expanding involves insertion

The bodies of some sections are not inserted until they are expanded.
In those cases we need to re-highlight section, otherwise the new text
would not be highlighted.
magit-dimmed: new face
add magit-refs-mode and magit-show-refs

Add a new mode `magit-refs-mode' which replaces the two old modes
`magit-branch-manager-mode' and `magit-wazzup-mode'.  The new entry
command is `magit-show-refs', replacing `magit-branch-manager' and
`magit-wazzup'.

Originally these had to be different modes because wazzup was so
slow that users would only tolerate it when they actually needed the
additional information it provided compared to the branch manager.
I have made wazzup fast quite some time ago but until now didn't get
around to merging the two modes.

The new mode is called "Refs Mode" because it lists all kinds of
references not just branches (that was already the case of the old
"'Branch' Manager" too).
change key bindings for magit-show-refs and magit-cherry

The old `magit-branch-manager' command was only bound in popups while
the old `magit-wazzup' command was only bound in the mode map (and the
dispatch popup).

Since there now is only `magit-show-refs', we can do better.  Because
this command is important enough give it the mode map.  But don't use
"w" which was used by `magit-wazzup' (and which we are going to use for
one of the sequence commands) instead use "y".  "y" was previously bound
to `magit-cherry', which can be considered a lightweight, but less
important, variant of the cherry-feature of `magit-show-refs', and is
now moved to "Y".

Do not bind `magit-show-refs' in any popups (except for the dispatch
popup).  Commands that are bound in the mode map don't need to be
available from popups (except the dispatch popup whose purpose is to
help users who don't know the binding in the mode map).
Merge branch 'n/refs-mode' into next
create a backup whenever git-apply is used

Always backup the applied diff when `git apply' is used.  Previously we
only did so when `git apply --reverse' was used.  We now backup more
diffs, but this still is not sufficient, so add appropriate warnings to
the relevant doc-strings.

The fate of this backup mechanism is undecided, I might replace it with
a mechanism based on `git stash' or I might improve it.  The problem
with the former is that it requires a (trivial) patch to git-stash, and
latter likely leads to complications elsewhere.

Because this no longer is only used when `--reverse' is used (which we
used to wrongly refer to as "revert") rename the involved functions and
variables, `magit-{revert => apply}-{backup,backup-file,undo}'.

Save the arguments used when applying the diff as diff pretext, and in
`magit-apply-undo' use the inverse of these arguments (which might mean
adding or *removing* the `--reverse' argument).
add function magit-apply-patch

Create function `magit-apply-patch' from code previously duplicated
in `magit-apply-{region,hunk,diff}'.
magit-visit-file: use magit-file-at-point
magit-dired-jump: use magit-file-at-point
magit-read-file-from-rev: add PROMPT argument, improve default
add magit-find-file{,-noselect,...}

Replace `magit-show' with the more fine-grained `magit-find-file',
`magit-find-file-other-window', `magit-find-file-noselect', and
`magit-find-index-noselect'.

The removed `magit-show' did to much, probably because the old and by
now removed ediff wrappers expected it to do so.  The upcoming new
implementation of the wrappers won't need that to the same extend, and
where they do they will dispatch the appropriate `*find-file*' function
themselves.

Also change and extend the buffer-local variables used in these blob
visiting functions: `magit-buffer-file-name' now is an absolute file
name, just as `buffer-file-name' is.  The function by the same name is
removed.  Instead teach `magit-file-relative-name' to default to the
current file/blob when its FILE argument is not provided.  Replace the
variable `magit-show-current-version' with `magit-buffer-revision' and
`magit-buffer-refname'; the former is the full commit hash, while the
latter is the revision as provided by the user, which is also used in
the `buffer-name', and might not actually be a refname.  Make the
`buffer-name' match what `vc' would use as closely as possible.

Remove the variable `magit-log-file', since `magit-read-file-from-rev'
retrieves the same information directly from `magit-refresh-args' now,
and `magit-log-file' is not used anywhere else.

This is intended as an intermediate implementation, whose time will end
once I get around to implementing a file-handler for blobs and trees.
Merge branch 'n/find-blob' into next
magit-ediff-resolve-file: new command

Add `magit-ediff-resolve-file', a simple wrapper around `smerge-ediff',
as a replacement for `magit-interactive-resolve'.  This fixes #256, i.e.
only unresolved commits are shown.  Ediff was created in the age of vcs
that are bad at merging and has not yet been adjusted for dvcs like Git
and Mercurial, and so it actually wants to do all everything that needs
to be done to do a merge.  However we want to initiate the merge using
Git and then we want Ediff to help us with the conflicts Git could not
automatically resolve; we don't want to also have Ediff attempt to
resolve the conflicts that Git already resolved, especially because
Ediff fails more often than Git, causing the user additional work.
That's why the command name contains "resolve" not "merge", we only
use Ediff to resolve conflicts, not to do a merge.
Merge branch 'n/ediff-resolve' into next
magit-run-git-sequencer: new function

Add new function `magit-run-git-sequencer' which generalizes setting
the "server arguments" as `magit-rebase-async' does.  Other "sequence"
operations to be implemented shortly need this too.  (For now?) keep
`magit-rebase-async' as a wrapper around the new function.
treat git-revert and git-cherry-pick as the sequence commands they are
treat git-am and git-rebase as the distinct commands they are
magit-rebase-{continue,skip,edit,abort}: use user-error