Cleanup and fix a bugs in Delta-patching code.
Cleanup and fix a bugs in Delta-patching code.

There were a few places where cp_off was being set instead of cp_size.
I also standardized on the use of position++ to track the current position
in order to make the code easier to follow.

geoffgarside/cocoagit,schacon/cocoagit,schacon/cocoagit,geoffgarside/cocoagit