Refactor JobMonitor.__exit__ a little bit to ensure job info always gets cleaned up