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 844323 - Follow-up: Fix typo in BrowserElementChildPreload that was breaking bg --> fg transitions in childVisibilityChanged. r=khuey, a=tef+

Also modify the test so it catches this mistake.