Bug 968016 - Call MediaDecoderStateMachine::Init() in MediaSourceDecoder::Load(), like MediaDecoder. r=kinetik

Load() is called by the media load algorithm, and this behaviour matches the
existing MediaDecoder. Calling MediaDecoderStateMachine::Init() ensures that
we'll be able to init the state machine properly (i.e. its soon to be added
shared thread pools) before we decode.
Bug 968016 - Add a parameter to SharedThreadPool to control the number of threads in the pool. r=kinteik
Bug 968016 - Implement nsThreadPool::IsOnCurrentThread() to return true when the current thread is in the thread pool. r=bsmedberg

This is so that we can assert that media decode threads are in the decode thread pool.
Bug 968016 - Add methods to SharedThreadPools and MediaTaskQueues to report whether we're running on one of their threads. r=kinetik
Bug 968016 - Use SharedThreadPool instead of manually managed threads for the media decoding. r=kinetik
Bug 968016 - Use a SharedThreadPool of size 1 for the Media State Machine thread. r=kinetik

This makes it easy to share the state machine thread, and for it to shut down
automatically when the last reference is dropped to it.
Bug 968016 - Add threadStackSize attribute to nsIThreadPool. r=bsmedberg
Bug 968016 - Ensure all threads in media SharedThreadPools are joined in MediaShutdownManager's xpcom shutdown listener. r=kinetik
Bug 968016 - Call MediaDecoderReader::OnDecodeThreadStart/Finish() in DecodeLoop(). r=kinetik
Bug 968016 - Wait until decode has finished before releasing resources when decoder becomes dormant. r=kinetik