[Mac] Do not let apps keep Chrome alive if shutting down.
If the user quits Chrome while Chrome Apps are running, we keep Chrome running
in the background and show a notification.
When Chrome is terminated because the system is shutting down or the user is
logging off, we should make sure Chrome terminates regardless of any running apps.
This CL detects whether an [NSApplication terminate:] is due to shutdown or log off
by listening for NSWorkspaceWillPowerOffNotification. This notification is only
received if Chrome is about to be terminated, i.e. we do not receive the notification
if another app prevented shutdown.
BUG=442280
Review URL: https://codereview.chromium.org/
831813003
Cr-Commit-Position: refs/heads/master@{#311215}