Bug 1062293 - Add specialized logging to track the lifetime state change of MediaStreamGraphs r=jesup a=lmandel

As noted in the comment, it is very useful to have this interleaved with the ADB
logcat on Android/b2g, because this way we can correlate gecko state with the
state of the Android HAL.
Bug 1062293 - Ensure the graph stays alive when doing driver switches and audio stream shutdown operations. r=jesup a=lmandel

This basically gets a grip on the graph while doing driver switches operations
on another thread (system thread or audio thread), because those can take time.
Because the graph is refcounted, it'll be freed when the last operation
finishes, which is what we want.

This patch also only allows driver switching when the graph is in state
LIFECYCLE_RUNNING, which is what we want anyway.
Bug 1062293 - Fix opensl's cubeb backend draining. r=kinetik a=lmandel
This ensures the callback won't be called when draining is done.
Bug 1064117: Stop GraphDriver always in Shutdown r=jesup a=lmandel