darwin: remove the device event source from the mode it was added to darwin_open_locked adds the source to kCFRunLoopCommonModes, but darwin_close_locked removed it from kCFRunLoopDefaultMode. The source stayed registered in the other common modes and the run loop kept a reference to it.