HPCC-12351 Use an internal buffer for small dyanamic strings

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>