make sure that dom and components state is cleared right before render

These could respond to changes to bindings during rendering, causing
problems