Solved stack overflow problem with ConcatStringResult

Replaced the current recursive implementation of ConcatStringResult by a
version that builds an ArrayList of StringResults right away and
iteratively produces a single string from the collected results.