function loadSettings() {
  return new Promise(resolve => {
    // Protip: debug what's in storage with:
    //   chrome.storage.local.get(['lighthouse_audits'], console.log)
    chrome.storage.local.get([STORAGE_KEYS.Categories, STORAGE_KEYS.Settings], result => {
      // Start with list of all default categories set to true so list is
      // always up to date.
      /** @type {Record<string, boolean>} */
      const defaultCategories = {};
      DEFAULT_CATEGORIES.forEach(category => {
        defaultCategories[category.id] = true;
      });

      // Load saved categories and settings, overwriting defaults with any
      // saved selections.
      const savedCategories = {...defaultCategories, ...result[STORAGE_KEYS.Categories]};

      const defaultSettings = {
        device: 'mobile',
      };
      const savedSettings = {...defaultSettings, ...result[STORAGE_KEYS.Settings]};

      resolve({
        backend: savedSettings.backend ?? 'psi',
        device: savedSettings.device,
        locale: savedSettings.locale ?? navigator.language,
        selectedCategories: Object.keys(savedCategories).filter(cat => savedCategories[cat]),
      });
    });
  });
}
Load selected category categories from local storage.
@return {Promise<Settings>}