Parent rewriter for file history, closes #2452

Emulates git's missing --parent rewriting with --follow for files with multiple names in history.
Merge pull request #2512 from qgppl/gp/fix-2452

Parent rewriter for file history, closes #2452