Reimplement IOInterface::ReadLine()

Now with 50% less stupid.