[PATCH v2 33/35] monitor: add support for auto-deleting monitors upon close