Added onAttach onDetach hook to ViewImpl

Yep we should throws an IllegalStateException if widget != null like Composite does. Moreover, we should also check that this method was called when the view is attached to the dom and throws an IllegalStateException if it's not the case