HPCC-8555 Rationalise ICodeContext and remove legacy functions

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Merge pull request #4008 from richardkchapman/codecontext-cleanup

HPCC-8555 Rationalise ICodeContext and remove legacy functions

Reviewed-by: Gavin Halliday <ghalliday@hpccsystems.com>