HPCC-9507 Changes after initial review

Removed use of strcpy and strcat and instead used memcpy iteratively where
needed.

Changed type for input param 'n' from UNSIGNED1 to UNSIGNED4, though a limit
for 'n' may still need to be implemented.

Inserted correct boundary conditions for text = NULL | '\0' and for 'n' = 0.

Regression test also added.

Signed-off-by: jamienoss <james.noss@lexisnexis.com>