Made TernaryExp*Node implement PreevaluatedExp

Adaptation in InstVarAtPutPrim might be a performance problem.

Signed-off-by: Stefan Marr <git@stefan-marr.de>