diff: Make numstat machine fritndly also for renames
Make result of git-diff --numstat more suitable for machines also when
renames are involved, by using format similar to the one for renames
in the raw diff format, instead of the format more suited for humans.
The numstat format for rename is now
added deleted TAB path for "src" TAB path for "dst" LF
or if -z option is used
added deleted TAB path for "src" NUL NUL path for "dst" NUL
When -z option is not used, TAB, LF, and backslash characters in pathnames
are represented as \t, \n, and \\, respectively.
Instead of saving human readable rename information in the 'name'
field when diffstat info is generated, do it when writing --stat
output.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>