Use a settings object for the main settings

This unifies the settings APIs.
Notes:
  * Settings aren't accessible in async callbacks anymore (because the registration works differently).
  * Security will need to be updated, but the changes won't be drastic.