HPCC-8361 Improvements to IR generator

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
HPCC-8361 Provide a function to convert a type to IR text

Also export a couple of other helper functions.

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Merge pull request #3817 from ghalliday/issue8361b

HPCC-8361 Improvements to IR generator

Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>