fixup diffstat sections in more civilized manner

Git may truncate filenames in diffstats, and because we use these string
for more than just showing them to the user we have to fix that.

The real filenames become available once when the diffs are washed, at
which point store these filenames in the diffstats section objects too.
For that to work we have to somehow pass the diffstat sections to the
code that washes the diffs.  Previously that was done using the variable
`magit-diffstat-cached-sections'.

By merging `magit-wash-diffstat' into `magit-wash-diffstat' we can now
do the civilized thing and pass the information using function arguments.
magit-wash-hunk: cosmetics
magit-wash-hunk: highlight whitespace errors only on added lines

For real this time.
magit-diff-item-insert-header: generate string, don't parse text

Generate the inserted string from information stored in the diff section
object instead of parsing the information in the buffer once more.  Now
it is a choice to keep the diff headers in the buffer, no longer a
necessity.
magit-wash-hunk: turn the first line into a proper heading

Previously the first line of a hunk looked like it was a heading but as
far as the section code was concerned it was actually just dressing up
as one.  The fact that it still worked like a section heading does not
contradict this statement, it just means that there is code within the
section handling that can deal with such broken sections, these kludges
could now be removed.  (We first have to make sure that no other section
remain that are broken in the same way, though.)

This commit turns the first line into a proper headings but due to the
inflexibility of `magit-with-section' with regards to how headings are
painted we have to delay the creation of the overlay until after the
`magit-with-section' has returned.  (The overlay is also a hack which
in turn is necessary because Emacs doesn't support negative overlays.)
dispose of unnecessary diff washing cycle

Previously staged and unstaged changes as displayed in the status buffer
were washed in two washing cycles.  All other diffs are and always were
washed in just one washing cycle, like everything else is too.  This was
either a historic accident or a failed attempt at improving performance.

If it was the latter then the motivation probably was that this allowed
delaying the insertion and washing hidden diffs until the got expanded.
However this actually decreases performance because it means Git has to
be called several times (at least on Windows where starting a process
seems to come with a huge overhead).

Getting the diff from Git once isn't what takes a long time, its Magit's
inefficient parsing and painting of the diff.  These steps have already
been made faster and we will be further improved.  If it turns out that
we cannot speed up the diff washing enough even for huge diffs then we
can still delay *washing only*.  To do that we don't have to also delay
the insertion of the diff.
magit-wash-diff: refactor

Refactor `magit-wash-diff', mainly because the old implementation was
dead ugly and to prepare for subsequent changes.  But this might also
give a slight performance boost.
magit-wash-diff: delete Git's diff headers

Replace the file and hunk diff headers after they have been parsed and
the Magit equivalents have been inserted.  This change is motivated by
to things: the standard headers are redundant and therefor only make the
diffs noisier, and it improves performance to remove these headers and
therefor also not having to paint them using overlays.

There is a downside too: it is no longer possible to save a Magit diff
buffer to a file and then pass that patch to Git or something else that
understands unified diffs.
improve look of headers of files inside diffs

Generally speaking make them look more like what `git status' would
display, except that the leading tab is removed (which moves into
the opposite direction).

Also make the headings using a dedicated face, by default by making
them bold.  Previously subheadings (hunk headings) stood out more
which didn't really makes sense.  Actually, depending on the custom
theme that might still be the case, but that's an issue that should
be addressed separately.
allow staging file mode change separately from other changes
magit-refresh-diff-buffer: specify -p explicitly

Explicitly call `git diff' with argument `-p' regardless of the value
of the (fairly unrelated) variable `magit-show-diffstat'.  When that
is non-nil use argument `--stat' instead of `--patch-with-stat' which
implies `-p', which happens to be redundant now.
magit-diff-extra-options: new temporary variable
detect renames and copies when showing diffs

Previously these were detected as removal and addition,
resp. as a new file that was created from scratch.
Merge branch 'wash-diff-wash' into next

Conflicts:
	magit.el