Bug 852847 - Part 4: Fix a child-process shutdown leak around nested event loops. r=smaug

This also fixes a non-shutdown leak which occurs if you remove an
<iframe mozbrowser> from the DOM while it's processing an alert().
Bug 844323 - Follow-up: Fix typo in BrowserElementChildPreload that was breaking bg --> fg transitions in childVisibilityChanged. r=khuey

Also modify the test so it catches this mistake.
Bug 860559 - Rev interface UUID.
Bug 852847 - Part 5: Fix assertions caused by part 4. r=me
No bug: Fix comment in ContentParent.cpp. DONTBUILD

Due to a typo in the comment, this was wasn't renamed in bug 844343 part 4.
Bug 864556 - Expose database revision in Contacts API. r=gwagner sr=mounir

--HG--
extra : rebase_source : b36e856f9fd85155096f88cb0c8ad41038052a25
Merge m-c to birch.
Merge mozilla-central to birch