This was originally added to make MediaPromise dispatch reliable in the
presence of the Flush() feature of MediaTaskQueue. That feature has
now been restricted to a special subclass (which we should eventually eliminate),
so we can just assert that MediaPromises are never used on those task queues
and simplify the rest of the code.
AbstractThread is a simplification of the existing MediaPromise code that guarantees that two events will not run at the same time - either because it's a single thread or because it's a task queue.