Get rid of deprecated 'xreadlines'

The xreadlines() method on file objects has been deprecated since Python 2.3.
The modern approach is to just use the file as an iterator, which will return
line-by-line text when the file is open in text mode.

Testing done: Ran unit tests.

Reviewed at https://reviews.reviewboard.org/r/4943/