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>