Bug 844323 - Prelude part 1: Use a pref to in nsHTMLMediaElement to control whether we talk to the audio service. r=amarchesini

Previously, we used #ifdef B2G.  Using a pref allows us to write mochitests which run in desktop Firefox that test the audio service and its interaction with other components.
Bug 844323 - Prelude part 2: Switch xpcom/base/StaticPtr from NULL to nullptr, and add a necessary include. r=khuey

This is necessary to make this header compile in one of the places I use it.  Anyway it's the right change.
Bug 844323 - Prelude part 3: Change ProcessPriorityManager's export directory. r=khuey

It was mozilla/dom/ipc/ before, but this changes it to mozilla/, which matches the class's namespace.
Bug 844323 - Prelude part 4: Use 's' prefix on class-static variables, not 'g'. r=me
Bug 844323 - Part 1: Move process preallocation logic out of ContentParent and into a new file, PreallocatedProcessManager. r=bent

Also make the PreallocatedProcessManager respond to pref changes.  This allows us to write a test involving the preallocated process.  Making this change was the main motivation for this patch; I moved the logic out of ContentParent because with the pref-watching code it was becoming unweildy.
Bug 844323 - Part 2 (The Main Event): Move ProcesPriorityManager to the main process. r=bent,khuey
Bug 844323 - Part 3: ProcessPriorityManager tests. r=nsm,khuey
Bug 860799 - Part 1: Give frames expecting a system message priority at least BACKGROUND_PERCEIVABLE, so long as either haven't yet handled the system message or are holding the CPU/high-priority wake lock. r=khuey
Bug 860799 - Part 2: Test that we give frames expecting a system message priority above vanilla BACKGROUND. r=khuey
Bug 861441 - When changing a proces's CPU priority, call setpriority() on all threads, not just the main thread. r=gsvelto

It turns out that setpriority() on Linux sets the priority of just one
thread.  If you call setpriority() on a pid, you're setting the priority
of only the main thread in that process.