HPCC-8555 Rationalise ICodeContext and remove legacy functions

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>