Refactor swap.c to use getline() instead of buf-filling
Refactor swap.c to use getline() instead of buf-filling

This drops a lot of code and even though we are using a common function,
the specification of only the needed things keeps it very efficient and
even more efficient in memory and time than the previous solution.

drkh5h/slstatus,drkhsh/slstatus