moved all tests that use files into same function
implemented lower memory alternatives for steps 2/7 and 3/8
refactored low-memory steps 2,3,7,8 to use a common priority-queueish class
implemented alternative lower memory step 4
lower memory requirements for steps 7&8
priority queue-ish structure now takes max bytes it's allowed to use instead of max items it's allowed to keep in memory
extra memory can now be selected from command line
simplified output writing in steps 7&8