Overhaul error handling in transform steps (fixes Debian bug #215285)
Three main principles were applied:
1. Check all return codes (this fixes Debian bug #215285, data is lost when
no space left on device).
2. Ensure that resources are not leaked (memory and file descriptors).
3. Consistently use the recode error signalling mechanism: rather than
arbitrarily signalling failure on an I/O error, set error level
RECODE_SYSTEM_ERROR, and signal failure according to fail_level.
It proved to be useful to merge perform_{memory,pass}_sequence.