Add support for automatically switching output files

... based on a configurable maximum output file size. This could be used for
a very crude background-compression scheme at the cost of higher IO rates than
would be required if compression was done on the stream.