DOM refresh performance fixes

- Improve performance of [NIDOM refresh] with various optimizations
- Don't refresh views when they are registered in the DOM or when CSS classes are added. Instead, let the CSS user call refresh: or refreshView: manually.