When a diff selection extends to the end of the diff, the range that is
created uses the `contentWrapper` for the `endContainer`. When calling
the `getLineElByChild` method on the `contentWrapper` the result is
`null`. Formerly, checking `null` for the line number attribute would
throw an exception and fall back to native copy.
With this change, the `_getRangeFromDiff` method is taught to accept
`undefined` for the `endLineNum` parameter. The `_getSelectedText`
method does a `null` check and passes `undefined` in this case.
Bug: Issue 7895
Change-Id: I27f42e0e40b6268a35498e72a953415ec97ca9d7