prop278: Refactor the torgzip module to support additional compression schemes

The current torgzip module should be refactored such that the new compression schemes needed for prop#278 can fit nicely into the code.

This is the tracking bug for this task.