Improvements to constant generation
Stop generating global const values twice
Fix library search path order
Allocate memory for function constants on the stack
Simplify handling of process and subprogram variables
Code tidy up in subprogram variable/constant generation