events: improve mutexing
This fixes a bug when zone_reload_modules only waits for an event to be finished, but following reschedule is not synchronized and might access memory freed by zone_free.
Self sign-up has been disabled due to increased spam activity. If you want to get access, please send an email to a project owner (preferred) or at gitlab(at)nic(dot)cz. We apologize for the inconvenience.
This fixes a bug when zone_reload_modules only waits for an event to be finished, but following reschedule is not synchronized and might access memory freed by zone_free.