magit-rewrite-pending-diff: new function

This is a substitute for `magit-insert-pending-changes'.  The latter was
problematic because its implementation has not kept up with improvements
elsewhere.  I.e. the section it inserted was initially expanded and
worse when the user did collapse it, it kept being re-expanded on every
refresh.

Unfortunately there is no easy fix.  The only place where we can
currently prevent a diff from being expanded is in the "raw diff
washing" code.  The pending changes section, unlike staged and unstaged,
does not use raw washing.  It would be a major undertaking to teach the
raw washing how to deal with pending changes.  I don't want to do that
especially because having an additional raw washing cycle is a mistake
itself, which I have already fixed on the `next' branch.