Add and use efficient string concatenation functions.

This patch modifies most of the string concatenations that show up in
race.swf and slime.swf as causing more than 1 MiB of allocations.
Merge pull request #1595 from nnethercote/concatN

Add and use efficient string concatenation functions.