Fix new CTest output handling for no newline
When we clear the buffer for an output pipe after returning the last
partial line (without a newline) we need to set the partial line range
to empty. Otherwise the buffer object is left in an inconsistent state.