This addresses ref https://github.com/pytest-dev/pytest/issues/1954.
The current truncation for assertion explanations does not deal with long lines
properly:
- Previously if lines were too long it would display a "-n more lines"
message.
- 999e7c6541 introduced a bug where long lines can
cause index errors if there are < 10 lines.
Extract the truncation logic into its own file and ensure it can deal with
long lines properly.