Added viewBeforeDisplay event callback

useful for cleaning up anything added to the view (e.g. popovers) before those elements are destroyed