Introduce git_buf_putcn

Allows for inserting the same character n amount of times
Introduce git__date_rfc2822_fmt. Allows for RFC2822 date headers
Added RFC2822 date format test cases
Fix const-correctness of git_patch_get_delta, git_patch_num_hunks, git_patch_num_lines_in_hunk
Added git_diff_stats test files
Introduce git_diff_get_stats, git_diff_stats_files_changed, git_diff_stats_insertions, git_diff_stats_deletions and git_diff_stats_to_buf
Introduce git_diff_format_email and git_diff_commit_as_email
Sanitize git_diff_format_email_options' summary parameter

It will form part of the subject line and should thus be one line.
Added a test case for formatting a binary patch e-mail
Add GIT_BRANCH_ALL to git_branch_t enum

git_branch_t is an enum so requesting GIT_BRANCH_LOCAL | GIT_BRANCH_REMOTE is not possible as it is not a member of the enum (at least VS2013 C++ complains about it).

This fixes a regression introduced in commit a667ca8298193b3103c1dbdcb1f6c527e6e99eb2 (PR #1946).

Signed-off-by: Sven Strickroth <email@cs-ware.de>
Merge pull request #2270 from csware/fix_git_branch_t_enum

Add GIT_BRANCH_LOCAL_AND_REMOTE to git_branch_t enum
Merge pull request #2261 from jacquesg/format-patch

Support for format-patch