Refactored StringBuilder to use a List<String> as a buffer and use

String.join() to build the result string more efficiently than string concatenation.

Introduced new method setDelimiter on CommaDelimitedListBuilder
to support a custom delimiter when building a string. The delimiter
defaults to a comma but can be changed as required.