Fix Issue 9599 - File.byLine doesn't function properly with take

http://d.puremagic.com/issues/show_bug.cgi?id=9599

Before, calling `take` could wrongly pop an extra line from the `ByLine` range.
Reading the current `front` is now only done when calling `front()`.

Note that `empty` is now less efficient as it will typically have to call `fgetc` and `ungetc`. I think this is acceptable as a correct implementation is more important than an efficient broken one.