HPCC-12081 Add ToJSON function to ECL

Signed-off-by: Anthony Fishbeck <anthony.fishbeck@lexisnexis.com>
Merge pull request #6366 from afishbeck/toJSON

HPCC-12081 Add ToJSON function to ECL

Reviewed-by: Gavin Halliday <ghalliday@hpccsystems.com>