Adding open and close events for Popup, popupopen and popupclose events for Marker

My use case is to show object geometry in GeoJSON along with it's marker and automatically hide it when marker is closed.