Notify waiters when releasing the monitor

This avoids a ping-pong thread scheduling issue, where a waiter
immediately tries to acquire the monitor held by the notifier.

Bug: 117842465

Change-Id: I33b91b066c9412b031fd6432bcb61273fb8d8fea
5 files changed