Fix Issue 13856 - std.stdio.readln stomps arrays

This avoid interference of readln with standard arrays.
It also avoids an allocation when passing a stack allocated buffer that is large enough to hold the line.

https://issues.dlang.org/show_bug.cgi?id=13856
The test is "did we have a capacity at the start (i.e. it was an appendable array) or did we allocate a new buffer. It is important to always update the "allocated" length in these cases, so the next call can append in place. If we don't do this and return a shorter buffer, the next call will detect capacity 0, which always causes a reallocation for lines longer than the previous ones.