Rewrite portable_getline( ) to use the streambuf directly.

That should speed it up quite a bit.
Add charaters to strings more intelligently.
Don't synchronize with stdio.