HPCC-9182 Make common routine for adding to FlushingStringBuffer queue

Signed-off-by: Anthony Fishbeck <Anthony.Fishbeck@lexisnexis.com>