We rely on being able to split lines and rejoin them to obtain the
original string. `str::lines()` in the Rust stdlib does not have this
property.
This was causing crashes in word-diffing on textual diffing, where
code paths differed on the number of lines they thought a string had.
This was broken in 8b842387a1.
Fixes#688.