Handle None elements in lists of TreeChange objects

The docstring of diff_tree.tree_changes_for_merge reports that it yields
lists of TreeChange objects, and that "An element may be None...".
Cherry-pick test for large buffer deltas.

Original change from yifanzhang at https://github.com/yifanzhang/dulwich
Added a `fallback_app` to Smart HTTP support to allow easy integration with other WSGI apps
Test for `fallback_app` (236052093a22fabbb52657f8d36bd02642e5e288)
Merge support for fallback_app argument to HTTPGitApplication.
Do not crash when cloning HEAD-less repo

For a git repository HEAD reference is optional.
.clone() would crash at the attempt to update
target repo 'HEAD' reference if source repo is HEAD-less.
Merge fix for handling None elements in list of TreeChange objects.
Fix syntax error in NEWS.
Fix syntax errors in docstrings.
Add test for cloning a repository without a HEAD.
Don't create a working tree if there is no HEAD in Repo.clone.
Merge fix for cloning repositories without HEAD set.
Support MemoryRepo.get_config.
Prevent errors about string formatting when tuples are passed.
fix http test on osx

Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
add a test for "Do not crash when cloning HEAD-less repo" with empty.git test data

Conflicts:
	dulwich/tests/test_repository.py

Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
gitignore: Ignore vim swap files.
Add 'make check-compat'.
Add function for testing whether to ignore specific error.
Protocol does not have a recv attritbue.
This causes dul-receive-pack to throw an error.

Fixes a bug where an AttributeError is thrown when dul-receive-pack is
run. This is caused due to the fact that the default protocol used is
the Protocol class, which does not have recv defined.

Signed-off-by: Jelmer Vernooij <jelmer@samba.org>