We have to be careful with caph_limit_stdio(): we cannot use it if one
of the input files is stdin, and we cannot use it after opening the
input files, since if one of the standard descriptors is closed it may
be reused for one of the input files.
Rather than partially duplicating caph_limit_stream() in main(), limit
rights in c_regular() and c_special(). Don't register a SIGSEGV handler
until we're committed to using mmap().
Add a regression test.