Precompute NXTransforms to speedup repeated application of TreeTransformer.macroTransform

Speeds up annotation transformers.
Also speeds up other initializations by calling .getClass less times.