Make templates etc get applied on measure.

Instead of when iterating visual children. This because everything is
likely to be set up by that point.
Added ScrollViewer to TreeViewStyle.