Fix chomp and read_lines

Implements the POLA behavior of reading lines.

Note: it seems that the interpreter behave strangely. However, things seems fine when combined with #932.
Therefore, I might have to wait that #932 is merged before integrating this one.

Close #974 and close #975 (see them for details)