b=925619 truncate TrackTicks differences to uint32_t after limiting to WEBAUDIO_BLOCK_SIZE r=ehsan

--HG--
extra : transplant_source : %F6%8B%89C%60%02Hm%11%9FZ%F7I%2BJ%CF%23%8E%CE%D3
b=925619 simplify loop sanity checks r=ehsan

The removed condition is always satisfied when mLoopEnd > 0.0

--HG--
extra : transplant_source : 4%9F%7C%92%F7-f%05%F96%0F%7C.%AF%8CE%82F%D3%A0
b=914016 always dispatch main thread updates after non-realtime graph finishes r=padenot

--HG--
extra : transplant_source : %0B%0C%93%05k%3F%3A%AEfT9%C9u%8D%C5pa%9F%11%0D
b=926522 remove unecessary shutdown code from ~nsThreadPool r=bsmedberg

While threads are processing their initial runnable, which is the nsThreadPool, it will not be
destroyed.  The threads remove themselves from mThreads before returning from Run().

This includes removal of changes from bug 900711.

--HG--
extra : transplant_source : %EF%E9%94L%E9d%F5%99b%09r%CB%024%86%88%BA%EFi%29
b=928222 move ReentrantMonitorAutoExit from VideoUtils.h to ReentrantMonitor.h r=bsmedberg

--HG--
extra : transplant_source : %13O%CF%90x%02%B8%B6%A3%EA%AD%03%99%9A7%1B%A0%21%C4%A3
b=928222 remove nsThreadPool per-thread event queues r=bsmedberg

The way idle nsThreadPool threads wait with a timeout doesn't work well with
shutdown from nsThreadManager.

nsThreadPool doesn't need to use nsIThread for its threads.  The nsIThread
interface is not useful for threads running in an nsThreadPool.
The nsIEventTarget on the nsIThreadPool should be used for dispatching events,
not an interface on the individual threads, and the threads don't need an
nsEventQueue because they use the nsEventQueue on the nsThreadPool.

Shutdown of single event threads is easier than running nested event loops for
nsIThreads, avoiding the multilevel nested event loop situations when several
threads finish and are shutdown.  While the ThreadFunc is running, a nested
event loop is still used in Shutdown() in case some consumers might need it
and because that is the documented API.

This also simplifies thread creation, avoiding races that could mean there was
temporarily an extra thread or more.

--HG--
extra : transplant_source : %F7%14%16%12%EF%E9%84%19D%26%3C%FE%1F%EC%FF%A3%BAG%C4%F3