Update to the xdiff code from Git v1.8.5.1

I threw in two additional commits to make it a bit easier to consume from this repository.