Stream-based patching

Addresses #12 by changing master patching to use streams for input and output instead of in-memory buffers. Diff.Apply is also heavily modified to reduce duplication and clean up the Diff API.