If we read exactly the number of bytes that fit into `p` then
implementation detected already an "overfilled" buffer and returned
the number of read bytes `n` and `nil` as error.
Fix this by treading the exact number not as "overfill". This way the
next `readPacket()` call we will read an empty chunk and `read()` will
return the number of read bytes `n` and `o.EOF` as (legitmate) error.
c.f. https://github.com/git-lfs/git-lfs/issues/1697
Previously, we flushed intermediate data out of the underlying *bufio.Writer
used by the implementation of `pkt-line` in `*git.pktline` after _every_ write.
This means that we would flush after partial packets, whole packets, and after
pkt-line flush sequences. This is unnecessary.
Let us instead flush only after an entire packet has been written, after
writing the `0000` flush sequence.
/ref git-lfs/git-lfs#1640