magit-gitignore: quote backslashes

Fixes #1687.
magit-insert-heading: always ensure it ends with a newline
magit-request-pull: use magit-git-insert
magit-git-string: cosmetics
magit-process-truncate-log: don't if magit-process-log-max is nil
magit-process-insert-section: new function
magit-git-insert: report error more gracefully

Adjust `magit-process-insert-section' to make that possible.