Make CfReadLine get mostly getline semantics (make it potentially dynamically allocate)

Please review this pull request *very* carefully.