Bug 938107 - Wait for media state machine thread to shutdown during XPCOM shutdown before returning. r=roc

Add a MediaShutdownManager and have that as the only xpcom-shutdown
observer. This then shutsdown the MediaDecoders, and blocks waiting for
the media state machine's shared thread to complete shutdown before
exiting from the xpcom-shutdown observer. This ensures that the
MediaDecoder infrastructure does not use XPCOM on any thread after XPCOM
has shutdown, which is a logical error.