hold the mutex while calling notify_all
hold the mutex while calling notify_all

This is a precondition when calling notify_all and fixes a dead lock in Electron on Windows
realm/realm-object-store,realm/realm-core,realm/realm-core,realm/realm-core,realm/realm-core,realm/realm-core,realm/realm-object-store,realm/realm-core,realm/realm-core,realm/realm-object-store