plumbing/object: avoid O(N^2) string building when decoding commit message
plumbing/object: avoid O(N^2) string building when decoding commit message

Most commits have relatively small messages, so this was never
noticeable. However, there are some repositories that have
semi-automated messages that can get very large (e.g.
github.com/riscv/riscv-clang and its riscv-trunk branch), on the order
of 109k lines. Changing from string += to using a bytes.Buffer reduces
the time for Commit.Decode for that specific case from 35s to 74ms.

Signed-off-by: David Symonds <7f6bb564ed9e580d4f0aa90d53b34578e5d24cb9@golang.org>

mcuadros/go-git,go-git/go-git,go-git/go-git,mcuadros/go-git