hgweb: use patch.diff() to make sensible diffs (issue1223, issue1258)
This gets us git diffs when enabled and doesn't pick erratic file parents.
To run the tests, do:cd tests/python run-tests.pySee http://www.selenic.com/mercurial/wiki/index.cgi/WritingTests formore information on writing tests.