A lot of refactoring of delta2 and some small cleanups and fixes for
other modules.
Improved debug output and made processing stop when a difference between
compressor input and decompressor output was detected.