magit-paint-hunk: don't paint typechanges

A typechange is treated as a hunk because it can be staged like a hunk
and because it saves a lot of work if we don't have to explicitly teach
many commands how to handle typechanges.  But `magit-paint-hunk' only
knows (and needs to) paint real hunks, so make it stop attempting to do
so for typechanges.

Close #1424.
fix the last fix
magit-insert-remote-branches: Account for HEAD

When running `git branch -vvr', cloned repos have a line like below.

    origin/HEAD               -> origin/master

This is not matched by `magit-wash-branch-line-re', leading to an error
when `magit-bind-match-strings' is called.

Now, `magit-bind-match-strings' is called only when a match is found.
Merge pull request #1426 from kyleam/fix-show-refs

magit-insert-remote-branches: Account for HEAD
magit-insert-stashes: work around issue in Git <1.7.10.3

Closes issue #1427.
Merge branch 'master' into next

Conflicts:
	magit.el
magit-update-index: new command

Note that this command and `magit-find-file-index-noselect' are only
intended to be used with Magit's upcoming Ediff integration.  They are
written in a way that they can also be used elsewhere, but if you do,
then you will surely run into problems; there are many details this
simple implementation does not take care of.
magit-find-file-index-noselect: ask before reverting
magit-revision-files: new function
magit-current-file: new function
magit-read-file-from-rev: make sure the default choice is valid
magit-discard-files--delete: change suffix of temporary index file

Use the same suffix we also use when visiting
a blob using `magit-find-file-index-noselect'.
magit-get-revision-buffer{,-create}: new functions
add new library magit-ediff

This is a new implementation of Magit's support for Ediff, replacing
the old implementation which can still be found on the master branch
(but was removed from this branch a while ago). Also see issue #1261.
Merge branch 'n/ediff' into next