Why do you initialize `PDView.prefs` at this point (inside `load`)? It would be far more convenient if the API is truly globally available, so that developers do not have to wonder whether the object already exists before it can be used.

Although the `Preferences` object is coded like a class, it should be used as a singleton. Is it possible to export a `Preferences` instance from preferences.js? This would be consistent with many other similar objects in PDF.js (e.g. `PDFHistory`, `SecondaryToolbar`, `PasswordPrompt`, `PresentationMode`), and make it easier to use `Preferences` in other modules.

Furthermore, the idea of promises is nice, but it makes development a bit difficult. If I want to update code and use the preferences, I have to scroll up and check whether some place has already initialized the preference promise. Do you have any objections against an API redesign (similar to how Node.js handles (a)synchronous APIs):

```javascript
// Use the following APIs if you are certain that the promise is already initialized.
void Preferences.setSync(String key, String value);
String Preferences.getSync(String key);

// Use the following APIs if you don't care whether the storage is ready, and only interested in the preferences
void Preferences.set(String key, String value, function callback(void) {});
void Preferences.get(String key, function callback(String value) {});
```

(or anything that makes it immediately obvious how the API is supposed to work.)

@Snuffleupagus What do you think?