Fix bug where truncated? would always be true for ISO-8859 files
The encode!
method can add or remove bytes to the stream due to a number
of reasons (e.g. bad encoding). We now store the loaded data size before
the data is altered.
We should probably revisit all the things encode!
does, but this MR at least makes whatever it does irrelevant.
Closes gitlab-org/gitlab-ce#18690