We now monkey-patch method in _TemplatedMixin rather than overriding directly. Use safety flag in mixin class to ensure we are actually being called for a server-rendered widget, otherwise we delegate back to the old method. This allows us to maintain the correct inheritance chaining, rather than interfering.
We had to override "attachTemplateNode" to ignore those children with a dojo-type attribute when descending from a node. Also remove dojo type once widget has been instantiated.
Fixed bugs to allow naming to be consistent for rendering widgets, set data-dojo-* properties in rendered templates.