Added onAttach onDetach hook to ViewImpl

While being at it, shouldn't we make sure that this is not called more than once? @Chris-V @jDramaix