TreeTransforms.init that returns a TreeTransform

Helps with cleaning up per-run storage inside TreeTransforms.
@odersky please review.