Replace map().reduce() with one accumulator loop in reflowSmallerGetNewLineLengths to avoid allocating an intermediate array when summing wrapped line trimmed lengths. Fixes #5942 Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>