Bug 845842 - Use promises that resolve on later ticks; r=rnewman

This is meant as a temporary workaround until a built-in promise library
offers similar functionality.
Bug 837292 - Part 1: Don't give each provider its own Preferences object; r=rnewman