Don't use SpooledTemporaryFile.

I don't know exactly why, but apply_delta_to_file() doesn't like
SpooledTemporaryFile, it produces seek() failures.
Give up flexible FilterChain in favor of simpler design.
Make encoding simpler and interruptible.
Use "yield from" where possible.