Defer OSX output stream Start() around system supend and resume.

Uses base::PowerMonitor to watch for suspend and resume events and
disables stream creation during suspend and for a second after a
resume is detected.

Since Start() is asynchronous anyways, this is pretty self contained
change.  If Stop() occurs before the deferred Start(), the pending
task is simply canceled.

This method has the advantage of preemptively preventing stream hangs
instead of trying to correct them after the fact.  It's also far less
invasive than the "restart all streams" workaround.  A risk is that
the post-resume delay is not long enough.

BUG=160920
TEST=repeated start/stop no longer fails.
NOTRY=true

Review URL: https://codereview.chromium.org/135853022

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@247026 0039d316-1c4b-4281-b951-d872f2087c98
5 files changed