encoding/line: fix line returned after EOF

Fixes #1509.

R=r
CC=golang-dev
https://golang.org/cl/4167045
2 files changed