Switch to notify, not sync_notify.

Despite the commit message on d19d927da6, I can't see how sync_notify
could possibly be faster (at least since OTP-8623), and I'm seeing performance issues when logging.

Now that we are logging asynchronously, we also need to add flushes in
critical places in the tests.