Avoid reading the mapped file into memory.

Up until now, the complete mapped file was read into memory to search
the mate (if available) for every unmapped mate.  This change turns it
the other way round; for each mapped read with unmapped mate we look up
the mate and perform the necessary fixup operations.  The unmapped file
is still kept in memory, however it's usually much smaller than the mapped
file.  All in all this change drastically lowers the memory requirements
of this script.